day 6
This commit is contained in:
parent
1b266b322c
commit
7cbf4495a3
|
@ -0,0 +1,7 @@
|
|||
L=list(map(int,__import__("sys").stdin.read().split(",")))
|
||||
for i in range(80):
|
||||
L = [ (l-1) for l in L ]
|
||||
n = sum( l < 0 for l in L)
|
||||
L = [ l if l>=0 else 6 for l in L ]
|
||||
L += [8]*n
|
||||
print(len(L))
|
|
@ -0,0 +1,9 @@
|
|||
D ={ i:0 for i in range(9) }
|
||||
for l in list(map(int,__import__("sys").stdin.read().split(","))):
|
||||
D[l]+=1
|
||||
for i in range(256):
|
||||
D = { i-1:D[i] for i in range(9) }
|
||||
D[6] += D[-1]
|
||||
D[8] = D[-1]
|
||||
del D[-1]
|
||||
print(sum(D.values()))
|
|
@ -0,0 +1 @@
|
|||
1,1,1,1,1,1,1,4,1,2,1,1,4,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,3,1,1,2,1,2,1,3,3,4,1,4,1,1,3,1,1,5,1,1,1,1,4,1,1,5,1,1,1,4,1,5,1,1,1,3,1,1,5,3,1,1,1,1,1,4,1,1,1,1,1,2,4,1,1,1,1,4,1,2,2,1,1,1,3,1,2,5,1,4,1,1,1,3,1,1,4,1,1,1,1,1,1,1,4,1,1,4,1,1,1,1,1,1,1,2,1,1,5,1,1,1,4,1,1,5,1,1,5,3,3,5,3,1,1,1,4,1,1,1,1,1,1,5,3,1,2,1,1,1,4,1,3,1,5,1,1,2,1,1,1,1,1,5,1,1,1,1,1,2,1,1,1,1,4,3,2,1,2,4,1,3,1,5,1,2,1,4,1,1,1,1,1,3,1,4,1,1,1,1,3,1,3,3,1,4,3,4,1,1,1,1,5,1,3,3,2,5,3,1,1,3,1,3,1,1,1,1,4,1,1,1,1,3,1,5,1,1,1,4,4,1,1,5,5,2,4,5,1,1,1,1,5,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,5,1,1,1,1,1,1,3,1,1,2,1,1
|
|
@ -0,0 +1 @@
|
|||
3,4,3,1,2
|
Loading…
Reference in New Issue