Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
9
Task/Babbage-problem/PascalABC.NET/babbage-problem.pas
Normal file
9
Task/Babbage-problem/PascalABC.NET/babbage-problem.pas
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
//the smallest positive integer whose square ends in the digits 269,696
|
||||
## var k:=269696;
|
||||
var n:=trunc(sqrt(k));(* Start with n *)
|
||||
if n mod 2<>0 then n-=1;(* n:=n-1 *)
|
||||
repeat
|
||||
n += 2 (* Increase n by 2. n:=n+2 *)
|
||||
until (n * n) mod 1000000 = 269696;
|
||||
$'The smallest positive integer is {n} whose square ends in {k}'.println;
|
||||
$'{n}² = {n*n}'.println;
|
||||
Loading…
Add table
Add a link
Reference in a new issue