python-algorithm

백준 21631 Checkers

무적김두칠 2022. 12. 21. 20:43

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

 

반응형