結果
問題 | No.1987 Sandglass Inconvenience |
ユーザー |
|
提出日時 | 2022-08-12 08:58:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 2,112 ms |
コンパイル使用メモリ | 191,156 KB |
最終ジャッジ日時 | 2025-01-30 20:23:57 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h>using namespace std;long long a, b, c, x;long long gcd(long long a, long long b) {if (b == 0)return a;return gcd(b, a % b);}int main() {cin >> a >> b >> c >> x;long long d = gcd(gcd(a, b), c);if(x % d == 0)cout << "Yes" << endl;elsecout << "No" << endl;}