結果
問題 | No.1250 汝は倍数なりや? |
ユーザー |
![]() |
提出日時 | 2023-12-23 17:29:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 1,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 1,966 ms |
コンパイル使用メモリ | 192,472 KB |
最終ジャッジ日時 | 2025-02-18 13:50:25 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 49 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;int main(){cin.tie(nullptr);ios_base::sync_with_stdio(false);ll N, H, A, P=1;cin >> N >> H;for (int i=0; i<N; i++){cin >> A;P = (P * A) % H;}cout << (P == 0 ? "YES" : "NO") << endl;return 0;}