728x90
문제 풀이
입력값에 0의 위치에 따른 빈칸의 값을 채워 출력해준다.
정답 코드
while True :
a, b, c = map(int, input().split())
if a == b == c == 0 : break
if a == 0 : print(c // b, b, c)
elif b == 0 : print(a, c // a, c)
else : print(a, b, a * b)
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 10180 - Ship Selection [python] (0) | 2023.03.28 |
---|---|
[BOJ/백준] 10178 - 할로윈의 사탕 [python] (0) | 2023.03.28 |
[BOJ/백준] 9945 - Centroid of Point Masses [python] (0) | 2023.03.28 |
[BOJ/백준] 9924 - The Euclidean Algorithm [python] (0) | 2023.03.28 |
[BOJ/백준] 9907 - ID [python] (0) | 2023.03.28 |