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

#787. Pairs with a sum divisible by 4

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

Examples

Input
13
9 26 0 32 40 29 29 50 20 5 5 27 42
Output
14
Input
8
24 19 20 16 23 11 23 17
Output
7

💡 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!