백준 온라인 저지 사이트의 문제 풀이
2869
import math
# a : 올라가는 미터, b : 미끄러지는 미터, v : 나무 막대
a, b, v = map(int, input().split())
# 걸린 일수
d = math.ceil(((v - b) / (a - b)))
print(d)
10250
t = int(input())
# test 케이스 만큼 입력 받기
for i in range(t):
h, w, n = map(int, input().split())
# 호수의 층 번호
f = n % h
# 호수의 방 번호
r = (n // h) + 1
# 딱 나누어 떨어지는 경우
if f == 0:
f = h
r -= 1
print((f * 100) + r)
1929
def isPrime(num):
for i in range(2, int(num ** 0.5) + 1):
if num % i == 0:
return 0
return 1 * (num != 1)
m, n = map(int, input().split())
for i in range(m, n + 1):
if isPrime(i):
print(i)
'programming study > 항해99 커리큘럼' 카테고리의 다른 글
[항해99 1기] [Chapter2-1] 자료구조, 알고리즘 (6) (2021.3.10) (0) | 2021.03.10 |
---|---|
[항해99 1기] [Chapter2-1] 자료구조, 알고리즘 (5) (2021.3.9) (0) | 2021.03.09 |
[항해99 1기] [Chapter2-1] 자료구조, 알고리즘 (3) (2021.3.7) (0) | 2021.03.08 |
[항해99 1기] [Chapter2-1] 자료구조, 알고리즘 (2) (2021.3.6) (0) | 2021.03.06 |
[항해99 1기] [Chapter2-1] 자료구조, 알고리즘 (1) (2021.3.5) (0) | 2021.03.05 |