diff options
author | Anthony Wang | 2020-09-03 10:12:11 -0500 |
---|---|---|
committer | Anthony Wang | 2020-09-03 10:12:11 -0500 |
commit | d12fb76f3713bc3f86abf5a04f2558afe5ce8075 (patch) | |
tree | 0d133cd4fffcddd2f75690b3d53248bc04ba23d3 | |
parent | d86595118779274684d671f7c9bf838d0ada7411 (diff) |
Create test.py
-rw-r--r-- | test.py | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,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) |