http://codeup.kr/problem.php?id=1509
Codeup 1509 - 진격 후 결과
matrix = []isProblem = Falsefor 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')
'알고리즘 문제 풀기 > Codeup' 카테고리의 다른 글
| Codeup 1513 - 지그재그 배열 3 (0) | 2019.03.30 |
|---|---|
| Codeup 1512 - 숫자 등고선 (0) | 2019.03.30 |
| Codeup 1508 - 나도 IQ 150 (0) | 2019.03.27 |
| Codeup 1507 - 4개의 직사각형 넓이 (0) | 2019.03.27 |
| Codeup 1506 - 2차원 배열 채우기 4(역달팽이 배열) (0) | 2019.03.26 |