Cod sursa(job #2751038)
Utilizator | Data | 13 mai 2021 22:56:54 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
int r;
while(b > 0) {
r = a % b;
a = b;
b = r;
}
return a;
}
ifstream in("cmmdc.in");
ofstream out("cmmdc.out");
int main() {
string str;
getline(in, str);
int nr_spaces = 0;
for(auto ch : str)
nr_spaces += (ch == ' ');
assert(nr_spaces == 1);
out << 4 << endl;
return 0;
}