python求助
查看原帖
python求助
1622717
AAAdidido356楼主2024/12/19 22:40
res:int
def conf(N):
    global res
    i=N%10
    res=0
    while True:
        N=N//10
        res=i+res*10
        i=N%10
        if i==0:
            return res
N=int(input())
if N>=0:
    res=conf(N)
else:
    N=-N
    res=-conf(N)
print(res)
2024/12/19 22:40
加载中...