https://www.codechef.com/viewsolution/30581651
Work’s fine and executes but on submission throws an error as wrong answer
https://www.codechef.com/viewsolution/30581651
Work’s fine and executes but on submission throws an error as wrong answer
Bro, Just add ( int min =Integer.MAX_VALUE; )
inside the while loop of t you will get AC!
this is your AC code- CodeChef: Practical coding for everyone
You were not initializing min to Integer.MAX_VALUE for every test case!
Thanks will try it and let you know…
Thanks for the help
Tried it dude still stuck with same error Can you please tell me what’s wrong with my while loop correcting that prompts me right answer
Please help me out Thanks in advance.
@anon61233355
Here’s the sample code:
https://www.codechef.com/viewsolution/30587257
What would happen if t=1000?
Sorry Sorry!!!..
You just write while(t!=0) for the test case or while(t>0 && t<=1000).
if t=1000 your code will have WA.
Just see the solution i posted.This is your solution but i edited and got an AC.