CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #797 #799 →

#798. Pairs with a sum divisible by 6

Count the pairs with i < j where a[i] + a[j] is divisible by 6. ### Input The first line has n, the second line has n integers separated by spaces. ### Output A number.

Examples

Input
13
22 35 0 26 12 39 3 28 44 0 35 47 43
Output
11
Input
7
1 39 44 50 26 1 6
Output
0

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!