結果
問題 | No.1987 Sandglass Inconvenience |
ユーザー |
|
提出日時 | 2022-06-24 22:09:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 996 ms |
コンパイル使用メモリ | 68,016 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 18:03:36 |
合計ジャッジ時間 | 1,731 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; long long gcd(long long a,long long b){ if(b==0) return a; return gcd(b,a%b); } int main() { long long a,b,c;cin>>a>>b>>c; long long x;cin>>x; long long ret = gcd(a,gcd(b,c)); if(x%ret==0) cout << "Yes"<< endl; else cout << "No"<<endl; }