Skip to content
Snippets Groups Projects
20.py 253 B
Newer Older
hacker717's avatar
hacker717 committed
c = -1
prev_h = 0

for i in range(int(input())):
    b = int(input())

    h = b % 256
    r = (b // 256) % 256
    m = b // (256 ** 2)

    hs = (37 * (m + r + prev_h)) % 256
    prev_h = h
    if h > 99 or h != hs:
        c = i
        break
print(c)