From 0de670f3247bb7a465485131711d4cd4fe00d7c0 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Mon, 14 Sep 2020 10:17:03 -0500 Subject: [PATCH] Add test.php --- test.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test.php diff --git a/test.php b/test.php new file mode 100644 index 0000000..9ba6cd5 --- /dev/null +++ b/test.php @@ -0,0 +1,23 @@ + 0) return gcd($b, $a % $b); + else return $a; +} + +echo "test\n"; + +const N = 1000; +$A = array(); +for ($i = 0; $i < N; $i++) { + $A[$i] = $i; +} + +$ans = 0; +foreach ($A as $i) { + foreach ($A as $j) { + $ans += gcd($i, $j); + } +} +echo $ans;