Hi everyone, Please review my submission: https://codeforces.net/problemset/submission/546/213448834
The logic is exactly the same as that of the person who got the first position in the contest. I'm unable to understand how to change the solution to get AC.
Edit: Changed cout to printf and cin to scanf.