|
|
вернуться в форумWA # 7 help me,plz! Послано Arthur 18 фев 2007 18:11 Re: WA # 7 help me,plz! Послано Arthur 18 фев 2007 19:47 anybody, who knows where can be error! help! Re: WA # 7 help me,plz! I'm also getting WA#7... and don't know why :'( Re: WA # 7 help me,plz! Послано Arthur 18 фев 2007 21:05 if you will find you mistake, please, write it here! ok? and if i'll find my, i'll write it here too. Re: WA # 7 help me,plz! size of ansver is greatest longint. Use int64. Re: WA # 7 help me,plz! 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 Re: WA # 7 help me,plz! Послано Arthur 19 фев 2007 13:51 Thank you very much! Re: WA # 7 help me,plz! Послано Kit 19 фев 2007 16:36 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 :) Re: WA # 7 help me,plz! Can anyone pls explain to me the sample output on test 3 Re: WA # 7 help me,plz! Послано Olly 23 фев 2007 19:18 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 Re: WA # 7 help me,plz! In test #7 the second line (instructions' string) is empty! Re: WA # 7 help me,plz! the problem could be reading the line with 10^5 characters. Re: WA # 7 help me,plz! How can we read a line of 10^5 chars in python and not get a runtime error? Re: WA # 7 help me,plz! use sys.stdin instead of input() |
|
|