結果

問題 No.1352 Three Coins
ユーザー hayaten
提出日時 2021-01-17 15:38:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 698 bytes
コンパイル時間 3,458 ms
コンパイル使用メモリ 191,072 KB
最終ジャッジ日時 2025-01-18 01:16:07
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 11 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n - 1); i >= 0; i--)
#define ALL(v) v.begin(), v.end()
using namespace std;
using P = pair<int, int>;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

int main() {
  ll a, b, c;
  cin >> a >> b >> c;
  ll g = gcd(a, gcd(b, c));
  if(g != 1){
    cout << "INF" << endl;
    return 0;
  }
  if(a == 1 || b == 1 || c == 1){
    cout << 0 << endl;
    return 0;
  }
  
}
0