Please read the new rule regarding the restriction on the use of AI tools. ×

Why is same logic in java not working?
Difference between en1 and en2, changed 14 character(s)
I was trying to solve Problem B from previous contest — round 976 div2. My solution is failing a testcase, its **NOT TLE**. Initially I thought maybe its due to Integer or Long overflow. To make sure I am not making any implementation errors, I even tried used the exact same code as given in editorial, still my code is failing testcase 8. Am I missing something, I tried reading other java solutions, but I think they encountered same problems, that's why most people used different approach while solving in java.↵

I am implementing the Code 1 of problem B in editorial.
<br>
**Problem Link** &mdash; https://codeforces.net/contest/2020/problem/B
 <br>
**Link to editorial** &mdash; https://codeforces.net/blog/entry/134516
 <br>
**Link to my submission** &mdash; https://codeforces.net/contest/2020/submission/284059093

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English __Aniket__ 2024-10-02 18:59:12 14
en1 English __Aniket__ 2024-10-02 18:58:16 855 Initial revision (published)