fix typo
This commit is contained in:
parent
815d8ae5c2
commit
9c24543479
10
22/1.py
10
22/1.py
|
@ -8,11 +8,11 @@ for c in content:
|
|||
if not c:
|
||||
part += 1
|
||||
continue
|
||||
if part == 0: # reading player 2 stack
|
||||
if part == 0: # reading player 1 stack
|
||||
if c.startswith("Player"):
|
||||
continue
|
||||
player1.append(int(c))
|
||||
if part == 1: # reading player 1 stack
|
||||
if part == 1: # reading player 2 stack
|
||||
if c.startswith("Player"):
|
||||
continue
|
||||
player2.append(int(c))
|
||||
|
@ -21,13 +21,11 @@ while len(player1) and len(player2):
|
|||
if player1[0] > player2[0]:
|
||||
player1.append(player1[0])
|
||||
player1.append(player2[0])
|
||||
del(player1[0])
|
||||
del(player2[0])
|
||||
else:
|
||||
player2.append(player2[0])
|
||||
player2.append(player1[0])
|
||||
del(player1[0])
|
||||
del(player2[0])
|
||||
del(player1[0])
|
||||
del(player2[0])
|
||||
|
||||
if len(player1):
|
||||
winner = player1
|
||||
|
|
4
22/2.py
4
22/2.py
|
@ -8,11 +8,11 @@ for c in content:
|
|||
if not c:
|
||||
part += 1
|
||||
continue
|
||||
if part == 0: # reading player 2 stack
|
||||
if part == 0: # reading player 1 stack
|
||||
if c.startswith("Player"):
|
||||
continue
|
||||
player1.append(int(c))
|
||||
if part == 1: # reading player 1 stack
|
||||
if part == 1: # reading player 2 stack
|
||||
if c.startswith("Player"):
|
||||
continue
|
||||
player2.append(int(c))
|
||||
|
|
Loading…
Reference in a new issue