cp_library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub downerkei/cp_library

:heavy_check_mark: verify/aoj/aoj_alds1_1_b.test.cpp

Depends on

Code

#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/problems/ALDS1_1_B"

#include <bits/stdc++.h>
using namespace std;

#include "../../math/gcd.hpp"

int main() {
    int x, y;
    cin >> x >> y;
    cout << gcd(x, y) << endl;

    return 0;
}
#line 1 "verify/aoj/aoj_alds1_1_b.test.cpp"
#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/problems/ALDS1_1_B"

#include <bits/stdc++.h>
using namespace std;

#line 1 "math/gcd.hpp"
long long gcd(long long a, long long b) {
    if(b == 0) return a;
    return gcd(b, a % b);
}
#line 7 "verify/aoj/aoj_alds1_1_b.test.cpp"

int main() {
    int x, y;
    cin >> x >> y;
    cout << gcd(x, y) << endl;

    return 0;
}
Back to top page