Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
9
Task/Babbage-problem/EMal/babbage-problem.emal
Normal file
9
Task/Babbage-problem/EMal/babbage-problem.emal
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
^|
|
||||
| Since the number must end with 269696 we can safely start counting from its square root;
|
||||
| we are only interested in its integer part.
|
||||
| We assign a value to a variable with "←".
|
||||
| The modulo symbol for getting the remainder of a division is "%".
|
||||
|^
|
||||
int i ← int!√269696
|
||||
while i² % 1000000 ≠ 269696 do ++i end
|
||||
writeLine(i)
|
||||
6
Task/Babbage-problem/Langur/babbage-problem.langur
Normal file
6
Task/Babbage-problem/Langur/babbage-problem.langur
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
for i = 2; i < 100000 ; i += 2 {
|
||||
if i*i rem 1000000 == 269696 {
|
||||
writeln "{{i}} ^ 2 == {{i^2}}"
|
||||
break
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue