I was just going through random solutions for task A (to observe different approaches), and then I came over this [submission:https://codeforces.net/contest/1421/submission/95867674] . Doesn't it seems that this guy mahimahans111 cheated. And to prevent plagiarism, he typed unnecessary while loops. His submission for task B suggests the same.
First, he tried to do B himself [submission:https://codeforces.net/contest/1421/submission/95879698], but got WA. Then he cheated again and this time [submission:https://codeforces.net/contest/1421/submission/95885430] it got AC.
It may be possible that this is his default boilerplate and he might use it in all submissions, but 2 different submissions for B proved this wrong.
Also see his submission for C [submission:https://codeforces.net/contest/1421/submission/95889375] is completely different from previous two. Apparently he solved C himself.
From this, I came to conclusion that he cheated in task A and B. I request concerned authority to take some action