結果
問題 | No.1250 汝は倍数なりや? |
ユーザー |
|
提出日時 | 2021-11-03 21:24:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 29 ms / 1,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 2,580 ms |
コンパイル使用メモリ | 190,980 KB |
最終ジャッジ日時 | 2025-01-25 11:11:47 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 49 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n,h,t; long long int val = 1; cin >> n >> h; for(int i=0;i<n;i++) { cin >> t; val*=t; val%=h; } if(val==0) cout << "YES" << '\n'; else cout << "NO" << '\n'; return 0; }