본문 바로가기
python-algorithm

백준 26561 Population

by 무적김두칠 2022. 12. 23.

https://www.acmicpc.net/problem/26561

 

26561번: Population

The first line of input will contain a single integer n that indicates the number of lines to follow. Each line will consist of two integers, p and t, where p is the beginning population, and t is the amount of time that will pass. Both p and t will be bet

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
10
def sol(p, t):
    answer = p - int(t/7+ int(t/4)
    return answer
 
if __name__ == '__main__':
    n = int(input())
    for _ in range(n):
        p, t = map(int, input().split())
        print(sol(p, t))
 
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 10188 Quadrilateral  (0) 2022.12.23
백준 26592 Triangle Height  (0) 2022.12.23
백준 26736 Wynik meczu  (0) 2022.12.23
백준 5358 Football Team  (0) 2022.12.22
백준 26332 Buying in Bulk  (0) 2022.12.22

댓글