Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,21 @@
EnableExplicit
Macro putresult(n)
If OpenConsole("Babbage_problem")
PrintN("The smallest number whose square ends in 269696 is " + Str(n))
Input()
EndIf
EndMacro
CompilerIf #PB_Processor_x64
#MAXINT = 1 << 63 - 1
CompilerElseIf #PB_Processor_x86
#MAXINT = 1 << 31 - 1
CompilerEndIf
#GOAL = 269696
#DIV = 1000000
Define n.i, q.i = Int(Sqr(#MAXINT))
For n = 2 To q Step 2
If (n*n) % #DIV = #GOAL : putresult(n) : Break : EndIf
Next