blob: f266d49fc74be63e6c2b220569d27c3bb3ffab56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Python 3
def gcd(a, b):
if b > 0: return gcd(b, a % b)
else: return a
print("test")
N = 1000
A = []
for i in range(0, N):
A.append(i)
ans = 0
for i in A:
for j in A:
ans += gcd(i, j)
print(ans)
|