We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdeb801 commit d51828dCopy full SHA for d51828d
check-if-it-is-a-good-array/gcd.hpp
@@ -1,18 +1,19 @@
1
// +build ignore
2
3
#pragma once
4
-#include <vector>
+// #include <vector>
5
6
-using namespace std;
7
-#include <algorithm>
8
-#include <numeric>
+// using namespace std;
+// #include <algorithm>
+// #include <numeric>
9
10
-
11
-int gcd(int num1, int num2) {
12
- while (num2 != 0) {
13
- int temp = num1;
14
- num1 = num2;
15
- num2 = temp % num2;
16
- }
17
- return num1;
+int gcd(int num1, int num2)
+{
+ while (num2 != 0)
+ {
+ int temp = num1;
+ num1 = num2;
+ num2 = temp % num2;
+ }
18
+ return num1;
19
};
0 commit comments