@kunal361 So long double is capable enough to store numbers of range 10^1000. This is “woww”. So in cases where precision is not of that importance we can use long doubles. Right ??
see this…http://ideone.com/SIZSbF
also for a functional code using double for a problem in the long contest u can have a look at this code…http://www.codechef.com/viewsolution/2129134 …this is 1 of my friends code he used 2D matrix of double to store the pascals triangle…!!!
interestingly it stored all values with adequate precision…!!!
@kunal361 is that link http://ideone.com/SIZSbF broken, nothing is displayed. Maybe it’s due to user’s privacy control.
oops sorry…changed it!!!
Getting WA … have checked for all the corner cases and getting correct result. Help me in figuring out what is it that I am doing wrong… need help with the test cases…
you dont print nething when ans in “0”…pls check that case…!!!
@viaan i m also getting wrong answer…even my solution gives 0 for a string consist of all zero’s
plz check my solution http://www.codechef.com/viewsolution/2295232
yes…9000 is correct!!!
thanks… I did change the code to print “0” …
Strange thing i noticed for my program it is giving no output if i have to print single zero. : http://ideone.com/R0mFoG
Also for this simple code to no out put: http://ideone.com/zTR0YP
Please help
print a “\n” after 0…i think it will solve the issue!!!
yeah i have checked all those cases…but still getting WA…http://www.codechef.com/viewsolution/2295232
I have the same output for the string. Make sure your output is zero when there is no input- that thing got me stuck the whole time!
thanks … it solved the issue… but still getting WA !!
What exactly do you mean by no input??
The Problem says 1<=|S|<=1000
Plz tell me why am i getting NZEC error in this code…
http://www.codechef.com/viewsolution/2296875
I am using String rather than integer and i have checked all the points @prad_adm has posted above…
getting WA… plzz help !! all of the inputs given in editorial givin correct answers…
ideone link : http://ideone.com/S6AwdE