|
|
вернуться в форумanybody, who knows where can be error! help! I'm also getting WA#7... and don't know why :'( if you will find you mistake, please, write it here! ok? and if i'll find my, i'll write it here too. size of ansver is greatest longint. Use int64. Thanks! After your post I managed to solve it. But, actually I was using int64, but... I've found out that if you write like this: ans:=x*y*z; where ans is int64 and x,y,z are integer you get WA After I wrote: ans:=x; ans:=ans*y; ans:=ans*z; I got Accepted. I think it happens because of calculation x*y*z is performed in integer and then converted to int64. Interesting... :-| Should have written in C. I guess I wouldn't have faced this if written in C. Edited by author 19.02.2007 00:56 Should have written in C. I guess I wouldn't have faced this if written in C. It's common feature of all compilers I know. I guess, C would not help you also :) Can anyone pls explain to me the sample output on test 3 I had wa7 too. be carefull printf("%lld\n",ans) IS WRONG! printf("%I64d\n",ans) is OK for MSVS2005 it's no matter, but not for Timus compiler In test #7 the second line (instructions' string) is empty! the problem could be reading the line with 10^5 characters. How can we read a line of 10^5 chars in python and not get a runtime error? use sys.stdin instead of input() |
|
|