|
|
вернуться в форумHelp me plizzzzz, My program works, but it's CRASHes when I send it! Please Help! Here is my code: ******************************************************* var i,n,h,k:integer; Procedure main; Begin readln(n); for i:=1 to n do begin readln(k); k:=k-1; h:=trunc(sqrt(2*k)); if h*(h+1)=2*k then write('1 ') else write('0 ') end End; BEGIN main END. *********************************************************** Integer overflow. Use longword (-) Re: Integer overflow. Use longword (-) Thank you very much!!! Re: Integer overflow. Use longword (-) or Cardinal!! :) Re: Integer overflow. Use longword (-) Thanks! I used longword and got AC, but what is "Cardinal". Re: Integer overflow. Use longword (-) CARDINAL = LONGWORD sizeof(cardinal)=4 min(CARDINAL)=0 MAX(CARDINAL)=2^32-1 P.S. Сardinal синоним LongWord!!! Understand???? in server compiling with help FREEPASCAL! (in UNIX or LINUX) Re: Integer overflow. Use longword (-) Thank you, now I know what is CARDINAL! |
|
|