当前位置:网站首页>Number of special palindromes in basic exercise of test questions

Number of special palindromes in basic exercise of test questions

2022-06-13 02:07:00 Jerry-hao

a = int(input())

for i in range(10000,1000000):
    #print(i)
    i = str(i)
    b = 0
    #print(i)
    #print(i[::-1])
    if i == i[::-1]:
        for j in i:
            #print("j is:",j)
            b+=int(j)
        if(b==a):
            print(i)

Blue Bridge Cup - Based on practice - Special palindrome number (Python)AC Code _Harry______ The blog of -CSDN Blog

Ah ,,, Still trying to figure out how to split it , The position of the first half is arranged and combined , Worry to death ,wszz

原网站

版权声明
本文为[Jerry-hao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280547094849.html

随机推荐