For this problem in yesterday’s SATURNALIA contest, the testcases are really weak!
https://www.codechef.com/viewsolution/27913656
https://www.codechef.com/viewsolution/27912172
A few of the wrong submissions.
Both of these don’t work for a simple testcase:
1
5 1
4 5
The first one outputs 7, while the second outputs 24. The actual answer is 9