Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 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