题解 | #自守数#
自守数
https://www.nowcoder.com/practice/88ddd31618f04514ae3a689e83f3ab8e
n=int(input())
res=[]
for i in range(n+1):
if str(i**2)[len(str(i**2))-len(str(i)):]==str(i):
res.append(i)
print(len(res))
自守数
https://www.nowcoder.com/practice/88ddd31618f04514ae3a689e83f3ab8e
n=int(input())
res=[]
for i in range(n+1):
if str(i**2)[len(str(i**2))-len(str(i)):]==str(i):
res.append(i)
print(len(res))
相关推荐
李橙子:结果虽不够理想,但过程本身已是宝贵的淬炼。能把学习机会放在薪酬之前,证明你目光长远。先踏实进去,用这段时间扎实学好Python后端,把公司项目吃透,你的价值会在下一份工作中完全体现。这个起点,值得。