-코드
h = int(input())
m = int(input())
for t in range(1, m + 1):
r = -6 * (t ** 4) + h * (t ** 3) + 2 * (t ** 2) + t
if r <= 0:
print(f"The balloon first touches ground at hour: {t}")
break
if r > 0:
print("The balloon does not touch ground in the given time.")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬]5220번 Error Detection (0) | 2021.04.22 |
---|---|
[백준/파이썬]18063번 Jazz Enthusiast (0) | 2021.04.22 |
[백준/파이썬]1920번 수 찾기 (0) | 2021.04.21 |
[백준/파이썬]1978번 소수 찾기 (0) | 2021.04.21 |
[백준/파이썬]21567번 숫자의 개수 2 (0) | 2021.04.21 |