Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

### MarioYC's blog

By MarioYC, 8 years ago, ,

I've tried submitting a solution to problem 120J - Минимальная сумма : 1350678, 1350695

But I get Idleness limit exceeded on test 1, I tested my code using Custom Test, but it seems to be working Ok, how can I fix this?

• -9

 » 8 years ago, # |   +11 Input and output from files "input.txt", "output.txt"
•  » » 6 years ago, # ^ |   0 can you please explain this with an example?
•  » » » 6 years ago, # ^ | ← Rev. 3 →   +13 freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); 
•  » » » » 6 years ago, # ^ |   0 thanks a lot!
•  » » » » 6 years ago, # ^ |   0 http://codeforces.com/submissions/agupta90# this my submission. can you please point out the problem?
•  » » » » » 6 years ago, # ^ |   0 i think it's bcz of getch() call
•  » » » » » » 6 years ago, # ^ |   0 nope, if i remove it,i'm getting wrong answer on test 1!
•  » » » » » » » 6 years ago, # ^ |   0 why u are printing a[i] in cycle?
•  » » » » » » » » 6 years ago, # ^ |   0 thanks again, it was a stupid mistake.now the code is running fine except for the test cases where input values are exceeding the range for "long int".I guess this has to be done in c++ or java