import sys
n = int(raw_input())
tot = 0
for i in xrange(n):
x = int(raw_input())
tot += x
print tot & 1
非常讨厌这种不把题面写明白,然后样例也不给明白的题目。
其实这题的本质就在于他给的那组公式上面。简单推导之后,所求答案就是“移动距离 与 1 的比特和”。
这题的难度就是有手就行。

import sys
n = int(raw_input())
tot = 0
for i in xrange(n):
x = int(raw_input())
tot += x
print tot & 1
非常讨厌这种不把题面写明白,然后样例也不给明白的题目。
其实这题的本质就在于他给的那组公式上面。简单推导之后,所求答案就是“移动距离 与 1 的比特和”。
这题的难度就是有手就行。