Problem Link: https://codeforces.net/contest/514/problem/A Submission1 : https://codeforces.net/contest/514/submission/206932949 which gives me RTE but in next submission the same code is AC. accepted submission: https://codeforces.net/contest/514/submission/206933863