728x90
반응형
단순 사칙연산 문제이다.
while 1:
a, b, c = map(int, input().split())
if a == b == c == 0:
break
if b-a == c-b:
print(f"AP {c + c-b}")
else:
print(f"GP {c * (c//b)}")
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 4909번 Judging Olympia(python) (0) | 2021.02.13 |
---|---|
백준 알고리즘 4892번 숫자 맞추기 게임(python) (0) | 2021.02.13 |
백준 알고리즘 4766번 일반 화학 실험(python) (0) | 2021.02.13 |
백준 알고리즘 4758번 Filling Out the Team(python) (0) | 2021.02.13 |
백준 알고리즘 4714번 Lunacy(python) (0) | 2021.02.13 |