k = int(input())
a, b = 0, 0
for i in range(2):
b += (k % 10) * (10**i)
k //= 10
a += (k % 10) * (10**i)
if a == b:
print(a)
else:
print(max(a, b))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
k = int(input())
a, b = 0, 0
for i in range(2):
b += (k % 10) * (10**i)
k //= 10
for i in range(2):
a += (k % 10) * (10**i)
k //= 10
if a == b:
print(a)
else:
print(max(a, b))