알고리즘 문제 풀기/Codeup
Codeup 1509 - 진격 후 결과
bug_maker
2019. 3. 28. 18:42
http://codeup.kr/problem.php?id=1509
Codeup 1509 - 진격 후 결과
matrix = []
isProblem = False
for i in range(10):
board = list(map(int, input().split()))
matrix.append(board)
horse = list(map(int, input().split()))
for i in range(0, 10):
if horse[i] == 0:
continue
isProblem = False
for j in range(9, -1, -1):
if matrix[j][i] != 0:
if matrix[j][i] > 0:
print(i+1, 'crash')
isProblem = True
break
else:
print(i+1, 'fall')
isProblem = True
break
if not isProblem:
print(i+1, 'safe')