I've been trying to do this problem, but it keeps failing on the 2nd test ![ ](https://codeforces.net/e7dc53/Screenshot 2021-07-31 094419.png) on my computer it gives the correct answer, but when I try to submit it fails. I tried to work around that test case and failed on the 3rd one ![ ](https://codeforces.net/50944c/Screenshot 2021-07-31 094640.png) so what am I doing wrong? It's standard input/output. here's my code:
also, this is my first post so I apologize if some janky sh!t happens