Question : “Problem - E1 - Codeforces”
My solution : “Submission #89107112 - Codeforces”
I simplify and write clean commented code, I think it will be helpful so I shared here.
Thanks, @galencolin ( after reading your code and dry run on paper, I finally understand where my previous code goes wrong )
