Add test.js
This commit is contained in:
parent
7d881a8f64
commit
d870dd2be3
22
test.js
Normal file
22
test.js
Normal file
|
@ -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);
|
Loading…
Reference in a new issue