Forgot Password input test cases

Hi all, since the competition is over, can someone please provide with sample input cases, my code is surely failing for just 1,2 cases, i have tried every case but its working for me. If someone can help, thanks in advance

for @kirat_saluja question

check for input
2
000.00000000
00000000000000000000000
output will be
0
0
not for @bipin2’s question

here is mine

for the time being please do check my code. If you dont understand dont mind asking. I am just looking. Let me look…:slight_smile: if you understand the mistake please do tell.

1 Like

@kirat_saluja: Here is the correct one. I debugged your code. I added some statements which are of C++ syntax. Hope you know the c++ syntax. I checked the code in my account. Ran in 2.00 seconds.

You problem was with the loop. You interchanged the indices. i and j. You were checking the reverse.
Have debugged the entire stuff and here is the code [here][1]

If you have any problem with syntax please do ask me…:slight_smile:

HAPPY CODING
[1]: http://ideone.com/2E43ys

4 Likes

@sanzzzay: i checked that one… THat was the first input that i checked :slight_smile: It works correctly :\

can you tell me what if ( (ch[i]==replace[j][0]) and (check[i]==0) ) is doing in C++, some reference please :wink:

1 Like

@betlista: i did not understand your question. Did you ask what is check[i] used for? If the value of check[i]==1 then we can understand that it has al-ready been replaced. We need not re-place it.

@betlista: just like a flag variable it acts. By the way you are a genious and are you making fun of me by asking me such doubt? :smiley:

@sanzzzay:
He is getting the correct output for that.

@bipin2 i am not expecting anything from any of you ok?
i am @kirat_saluja asked some test cases i am suggesting him thats all

@the test case which you told him was getting the right output. His mistake was something else and i have debugged it. I am sorry if i have offended you. Really sorry buddy…:slight_smile: Happy?

I have spend around 30 minutes to de-bug the code. And it is dissapointing that we get some -ve votes here even after doing some good.

@same was i am trying and you have started given 2 down vote back to back also in the one question where question is asked by someone else

yea i am fine … :slight_smile:

Sorry, I was not asking about replace and check arrays, but frankly I do not know how the and is used in C++, I’m Java guy is it the same as && ? You know, it’s not easy to google for “and”…

oh!!! @betlista: haha… I thought you being a genius is trying to mock me :stuck_out_tongue:
Yes BOSS in C and C++ instead of ‘&&’ can use ‘and’ and instead of ‘||’ we can use ‘or’
I am planning to make a new post very soon which includes some tricky facts about C and C++ which can be helpful to newbies while taking part in coding contests. :slight_smile:

I did it because you were giving test cases which his code produced the correct output. And i told you and it was giving the same and still went on and posted the same test case. That is why i down-voted.
NO offence. :slight_smile:

ok for @kirat_saluja case you are gonna judge me fine …if @kirat_saluja would have given me a downvote it is fine because its his doubt and his perspective and yours perspective may differ my answer was not for your question ,it was for @kirat_saluja … and i didnt find any link regarding his code so how am i supposed to debug it …

@sanzzzay: what i told was that the test case which you were providing was not the one which was causing the mistake. I commented it twice and you were posting the same. I repeat I am sorry for Down-voting.

@bipin2 i think u didnt read my previous comment fully i repeat “i didnt find any link regarding his code so how am i supposed to debug it” and all is @kirat_saluja asking for some test cases …so i did …