본문 바로가기

프로그래밍/백준

2908 상수

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
def func_restring(s):
    res = ''
    for i in range(len(s)):
        res += s[len(s) - i - 1]
    return res
 
 
def main():
    temp = input()
 
    a = temp.split(' ')[0]
    b = temp.split(' ')[1]
 
    A = int(func_restring(a))
    B = int(func_restring(b))
 
    if A < B:
        print(B)
    else:
        print(A)
 
 
if __name__ == '__main__':
    main()
cs


'프로그래밍 > 백준' 카테고리의 다른 글

15552 빠른 A+B  (0) 2018.05.26
5622 다이얼  (0) 2018.02.08
1316 그룹 단어 체커  (0) 2017.10.20
1157 단어 공부  (0) 2017.10.20
2675 문자열 반복  (0) 2017.10.15