algorithm

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

View the Project on GitHub gtnao/algorithm

:heavy_check_mark: src/math/gcd.hpp

Required by

Verified with

Code

#pragma once

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

template <typename T = long long> T gcd(T a, T b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
#line 2 "src/math/gcd.hpp"

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

template <typename T = long long> T gcd(T a, T b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
Back to top page