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

#756. Pairs with a sum divisible by 2

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

Examples

Input
13
28 36 42 42 12 21 12 12 5 29 1 36 34
Output
42
Input
14
34 4 26 28 7 42 37 22 46 13 23 0 4 14
Output
51

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