py求助

P1307 [NOIP2011 普及组] 数字反转

MC_xjhjdA @ 2024-04-20 09:53:55

a=int(input())
if a<0:
    print('-'+str(int(str(abs(a))[::-1])))
else:
    print(str(a)[::-1])

70分


by small_lemon_qwq @ 2024-04-20 10:17:21

前导0


|