728x90
반응형
단순 구현 문제이다.
m, n = map(int, input().split())
print("satisfactory" if m >= 8 else "unsatisfactory")
사실 m이 8 이상이면 satisfactory 8 미만이면 unsatisfactory 출력하는게 끝인데
아래 코드 같이 삽질을 하기도 했다. 아래 코드도 통과된다.
m, n = map(int, input().split())
check = 0
for _ in range(m):
a, b, c = map(int, input().split())
a = 1 if a > 0 else 0
b = 1 if a > 0 else 0
c = 1 if a > 0 else 0
if (not a or b or c) and (not a or not b or c) and (a or not b or c) \
and (a or not b or not c) and (a or b or c) and m >= 8:
check = 1
print("satisfactory" if check else "unsatisfactory")
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 18330번 Petrol(python) (0) | 2021.02.09 |
---|---|
백준 알고리즘 18005번 Even or Odd?(python) (0) | 2021.02.09 |
백준 알고리즘 17874번 Piece of Cake!(python) (0) | 2021.02.09 |
백준 알고리즘 17863번 FYI (python) (0) | 2021.02.09 |
백준 알고리즘 17388번 와글와글 숭고한(python) (0) | 2021.02.09 |