Blame view

P88790_en/S002-AC.cc 287 Bytes
Imanol-Mikel Barba Sabariego authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>

using namespace std;

int gcd(int a, int b)
{
	if(!a)
	{
		return b;
	}
	if(!b)
	{
		return a;
	}
	int res;
	while(b)
	{
		res = b;
		b = a % b;
		a = res;
	}
	return res;
}


int main()
{
/*	int a,b;
	cin >> a;
	cin >> b;
	cout << gcd(a,b) << endl;
	return 0;
*/
}