Code in codeforces outputting different answers to replit and gbd My code for problem 1742B in Codeforces: