Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Babbage-problem/Java/babbage-problem.java
Normal file
20
Task/Babbage-problem/Java/babbage-problem.java
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
public class Test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// let n be zero
|
||||
int n = 0;
|
||||
|
||||
// repeat the following action
|
||||
do {
|
||||
|
||||
// increase n by 1
|
||||
n++;
|
||||
|
||||
// while the modulo of n times n is not equal to 269696
|
||||
} while (n * n % 1000_000 != 269696);
|
||||
|
||||
// show the result
|
||||
System.out.println(n);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue