Quick actions

cmd+k|ctrl+k

Navigation

Languages

100a+b=c^2+d^2, 100c+d=a^2+b^2

Snippet info

Language

Julia

Visibility

public

Author

antimon2

Created

2017-05-07T14:15:45Z

Updated

2017-05-07T14:15:45Z

f(x::Int) = (x ÷ 100)^2 + (x % 100)^2

@time res = [(x,f(x)) for x=100:9999 if f(f(x))==x]

for pair in res println(pair) end
INFO