Problem of Ben Betsalel
具体题目请点击我查看
AC:
n=int(input())
print(n**2)
print(n)
超时:
import math
n=int(input())
for i in range(1,n+1):
s=n*i
if(math.sqrt(s)==int(math.sqrt(s))):
print(i*int(math.sqrt(s)))
print(i)
break
我吐了。。。