if __name__ == '__main__':
n = int(input())
res = []
inputs = input().split(" ")
for i in inputs:
has = False
for j in range(10):
s = str(int(i) * int(i) * (j+1))
if s[-(len(i)):] == i:
res.append(str(j+1) + " " + s)
has = True
break
if not has:
res.append("No")
for i in res:
print(i)
PAT (Basic Level) Practice (中文)1091 N-自守数
最新推荐文章于 2024-09-03 18:29:17 发布