diff options
author | Anthony Wang | 2021-04-18 21:55:42 -0500 |
---|---|---|
committer | GitHub | 2021-04-18 21:55:42 -0500 |
commit | 071d2e0f49bce7f073338975b355e549fa0f4fa8 (patch) | |
tree | 726f0f7ebf3adf19b2ed4518af7078f679470948 | |
parent | 732010e70b03286508657a46e3312458f1bd2fa5 (diff) |
Create test.cs
-rw-r--r-- | test.cs | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +// C# + +using System; +class test +{ + static int gcd(int a, int b) + { + if (b > 0) return gcd(b, a % b); + else return a; + } + static void Main() + { + Console.WriteLine("test"); + + const 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); + } + } + Console.WriteLine(ans); + } +} |