aboutsummaryrefslogtreecommitdiff
path: root/challenge-111/laurent-rosenfeld/python/ch-1.py
blob: 5b7c24b282b19ad5ab21f1b3b16b2cf67fc5ed5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
matrix = ( [  1,  2,  3,  5,  7 ],
           [  9, 11, 15, 19, 20 ],
           [ 23, 24, 25, 29, 31 ],
           [ 32, 33, 39, 40, 42 ],
           [ 45, 47, 48, 49, 50 ]
         );

hash = {}
for row in matrix:
    for item in row:
        hash[item] = 1

for i in range(55):
    if i in hash:
        print(i, " => 1")
    else:
        print(i, " => 0")