aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2020-09-06 09:54:06 -0500
committerAnthony Wang2020-09-06 09:54:06 -0500
commitef197cb02c1810d29ab26ca8d980c9575a583e02 (patch)
treed527e5a31ce5151742e2cc0c8ea697d4f222c9aa
parentd12fb76f3713bc3f86abf5a04f2558afe5ce8075 (diff)
Create test.java
-rw-r--r--test.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/test.java b/test.java
new file mode 100644
index 0000000..fa65246
--- /dev/null
+++ b/test.java
@@ -0,0 +1,31 @@
+// Java
+
+public class test
+{
+ public static int gcd(int a, int b)
+ {
+ if (b > 0) return gcd(b, a % b);
+ else return a;
+ }
+ public static void main(String args[])
+ {
+ System.out.println("test");
+
+ final int N = 1000;
+ int A[] = new int[N];
+ for (int i = 0; i < N; i++)
+ {
+ A[i] = i;
+ }
+
+ int ans = 0;
+ for (int i = 0; i < N; i++)
+ {
+ for (int j = 0; j < N; j++)
+ {
+ ans += gcd(i, j);
+ }
+ }
+ System.out.println(ans);
+ }
+}