Skip to content

Commit d51828d

Browse files
committed
Update gcd.hpp
1 parent cdeb801 commit d51828d

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

check-if-it-is-a-good-array/gcd.hpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
// +build ignore
22

33
#pragma once
4-
#include <vector>
4+
// #include <vector>
55

6-
using namespace std;
7-
#include <algorithm>
8-
#include <numeric>
6+
// using namespace std;
7+
// #include <algorithm>
8+
// #include <numeric>
99

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;
10+
int gcd(int num1, int num2)
11+
{
12+
while (num2 != 0)
13+
{
14+
int temp = num1;
15+
num1 = num2;
16+
num2 = temp % num2;
17+
}
18+
return num1;
1819
};

0 commit comments

Comments
 (0)