본문 바로가기
python-algorithm

백준 25828 Corona Virus Testing

by 무적김두칠 2022. 11. 30.

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

 

25828번: Corona Virus Testing

Testing for Corona can be done individually, e.g., 100 people require 100 test kits. Alternatively, the test can be done in groups (pools), e.g., 100 people can be divided into five group of 20 people each and then using only one test kid per group. If one

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
def sol(g,p,t):
    origin = g * p
    new = g + p * t
    if origin < new:
        return 1
    elif origin > new:
        return 2
    else:
        return 0
 
if __name__ == '__main__':
    g, p, t = map(int, input().split())
    print(sol(g, p, t))
 
cs
반응형

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

백준 11104 Fridge of Your Dreams  (0) 2022.11.30
백준 26082 WARBOY  (0) 2022.11.30
백준 17903 Counting Clauses  (0) 2022.11.30
백준 3060 욕심쟁이 돼지  (0) 2022.11.30
백준 25915 연세여 사랑한다  (0) 2022.11.30

댓글