본문 바로가기
python-algorithm

백준 21631 Checkers

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

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

 

21631번: Checkers

The only line of input contains two integers $a$ and $b$ --- the number of white and black pieces, respectively ($0 \le a, b \le 10^{18}$).

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
10
def sol(a, b):
    if a>=b:
        return b
    else:
        return a+1
 
if __name__ == '__main__':
    a, b = map(int, input().split())
    print(sol(a, b))
 
cs

 

반응형

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

백준 26711 A+B  (0) 2022.12.22
백준 20833 Kuber  (0) 2022.12.21
백준 24075 計算 (Calculation)  (0) 2022.12.21
백준 21354 Äpplen och päron  (0) 2022.12.21
백준 21633 Bank Transfer  (0) 2022.12.21

댓글