結果
| 問題 |
No.1250 汝は倍数なりや?
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2020-10-10 11:07:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 97 ms / 1,000 ms |
| コード長 | 227 bytes |
| コンパイル時間 | 606 ms |
| コンパイル使用メモリ | 67,152 KB |
| 最終ジャッジ日時 | 2025-01-15 06:15:37 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 49 |
ソースコード
#include <iostream>
#include <numeric>
using namespace std;
int main() {
int n, h; cin >> n >> h;
for (int i = 0; i < n; i++) {
int a; cin >> a;
h /= gcd(h, a);
}
puts(h == 1 ? "YES" : "NO");
}
norioc