結果
問題 | No.1250 汝は倍数なりや? |
ユーザー |
|
提出日時 | 2024-11-09 18:31:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 93 ms / 1,000 ms |
コード長 | 262 bytes |
コンパイル時間 | 2,104 ms |
コンパイル使用メモリ | 193,232 KB |
最終ジャッジ日時 | 2025-02-25 03:20:03 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 49 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N, H; cin >> N >> H; long long sum = 1; for (int i = 0; i < N; i++){ int a; cin >> a; sum *= a; sum %= H; } if (sum == 0){ cout << "YES" << endl; } else { cout << "NO" << endl; } }