aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..e12086c
--- /dev/null
+++ b/test.js
@@ -0,0 +1,22 @@
+// Node.js
+
+function gcd(a, b) {
+ if (b > 0) return gcd(b, a % b);
+ else return a;
+}
+
+console.log("test");
+
+const N = 1000;
+var A = [];
+for (var i = 0; i < N; i++) {
+ A.push(i);
+}
+
+var ans = 0;
+for (i of A) {
+ for (j of A) {
+ ans += gcd(i, j);
+ }
+}
+console.log(ans);