RosettaCodeData/Task/Pells-equation/Zkl/pells-equation-2.zkl
2023-07-01 13:44:08 -04:00

4 lines
131 B
Text

foreach n in (T(61, 109, 181, 277)){
x,y:=solve_pell(n);
println("x^2 - %3d*y^2 = 1 for x = %-21d and y = %d".fmt(n,x,y));
}