June long 2020 TUPLE

Why is my code not getting accepted?

https://www.codechef.com/viewsolution/34052725

Consider the testcase:

1
2 2 1
4 4 2

Correct Answer: 1
Your Answer: 2

oh…ok thanks