結果
| 問題 |
No.2682 Visible Divisible
|
| コンテスト | |
| ユーザー |
SnowBeenDiding
|
| 提出日時 | 2024-03-20 21:42:24 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 182 ms / 2,000 ms |
| コード長 | 466 bytes |
| コンパイル時間 | 4,832 ms |
| コンパイル使用メモリ | 307,908 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-30 07:32:41 |
| 合計ジャッジ時間 | 8,232 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace std;
using namespace atcoder;
typedef long long ll;
int main() {
int n;
ll k;
cin >> n >> k;
ll lc = 1;
rep(i, 0, n) {
ll x;
cin >> x;
x = gcd(x, k);
lc = gcd(lc, k);
lc = lcm(lc, x);
}
if (k == lc)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
SnowBeenDiding