FORGETPW - Editorial

It will show runtime error because you have to enter N not the actual string after number of test cases.

@ PARTNER( :slight_smile: ),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.

This should return 333, right? http://ideone.com/V5PZ7B

1 Like

Same situation here. Got 0, 0, .12003, 120000 and 0.But still gives wrong answer in system test.

this is my solution. can anybody tell me what’s wrong with this solution. it passed all tricky test cases but still showing wrong answer.
http://www.codechef.com/viewsolution/4119925

My code works fine for all the input cases, I also tried my code with the tricky cases mentioned in the editorial but i am still getting WA. Can anyone please explain to me what the problem is.


[1]


  [1]: http://www.codechef.com/viewsolution/4120495

Your code has the same problem. http://discuss.codechef.com/questions/45391/forgot-password-input-test-cases is the answer that i have posted. Unfortunately you have down-voted my answer for no reason :frowning:

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

@betlista: Thanks! will correct it now!

I’m getting a correct answer for every corner case, for every cases I read in the comments, yet getting a WA.


[1]
Can someone help me to tell where is it that I am going wrong?


  [1]: http://www.codechef.com/viewsolution/4123826

getting WA after trying several test cases… http://www.codechef.com/viewsolution/4102057 …can someone help…!!

I am getting all test cases correct on my system still it is giving wrong answer …please suggest what i am doing wrong…
http://www.codechef.com/viewsolution/4124811

I’m just doing these for practice, but its really hard to call ā€œ.ā€ a ā€œpositive decimal numberā€. Arguably its also hard to call ā€œ0ā€ and ā€œ0.0ā€ as a ā€œpositive decimal numberā€ (ā€œnon-negative decimal numberā€ would have been more appropriate), but I don’t think that ā€œ.ā€ passes as a ā€œpositive decimal numberā€ in any culture I’m aware of.

@dpraveen :diamonds::diamonds: could you please help me here…thanxxx…

plz can anyone point out the error… http://ideone.com/5l8Jy2
i spent lot of time over it…(>_<)