It will show runtime error because you have to enter N not the actual string after number of test cases.
@ PARTNER(
),If the number contains “only” non-zero fractional part, the integral part should be omitted."
Then THAT “ONLY” itself means that there will be no integral part…isn’t it!!!and if there is no integral part then what is the need of stating to delete integral part!!!
try for n=0 and s=“000000000”
you have not handled this case. It should give answer as 0
try to work on this case too.
good luck…!!!
try for 4 different cases which are mainly important
n=0
s=0.0 ,
n=0
s=00000 ,
n=0
s=0000.120030000 and
n=0
s=0000120000.0000
Still you want any case then try for ‘.’ only
good luck…!!!
if u give ‘space’ instead of n… it fails… how should i correct it?
@pmbhumkar - I’m getting expected result on all those tests: 0, 0, .12003, 0
Any other suggestions? It would really help to see exactly which test cases the code failed on.
Same situation here. Got 0, 0, .12003, 120000 and 0.But still gives wrong answer in system test.
Your code has the same problem. Forgot Password input test cases - general - CodeChef Discuss is the answer that i have posted. Unfortunately you have down-voted my answer for no reason ![]()
0 ≤ N ≤ 94 this constraint is given and u have used char x[30],y[30];that means to accomodate max 95 char u need array of atleast 95 size
check this. its correct…but give WA in codechef
Yeah, just as @codename007 said, the statement stated that the number will be positive. I am quite certain, 0000.0000 or 0 is not a positive number. Right?
1 2 e 9 i 8 8 0 ei for this test case your answer outputs 57 it should be 98. also it gives WA for many of the test cases. Try a bit more, you can get it correct.
check your code here aPoddj - Online C Compiler & Debugging Tool - Ideone.com
dont u think output should be 100 instead of 0
check your code here gXgNOa - Online C++ Compiler & Debugging Tool - Ideone.com
dont you think output of string 001800 should be 1800
…![]()
check your code vwfLid - Online C++ Compiler & Debugging Tool - Ideone.com
output should be 100
earlier i was also doing the same mistake…@sanzzzay pointed it out
@grvana for your help…i corrected the mistake you pointed out…but there still seems to be some prob as the code still gives WA on submitting…Revised code CodeChef: Practical coding for everyone
I have checked all the test cases. but i am still not able to get successful submission.
http://www.codechef.com/viewsolution/5135021
