結果
問題 |
No.1250 汝は倍数なりや?
|
ユーザー |
|
提出日時 | 2020-10-09 21:31:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 366 bytes |
コンパイル時間 | 1,609 ms |
コンパイル使用メモリ | 191,948 KB |
最終ジャッジ日時 | 2025-01-15 04:02:36 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 WA * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) void solve() { ll N, H; cin >> N >> H; ll sum = 1LL; rep(i, 0, N) { ll a; cin >> a; sum *= a; } cout << ((sum % H == 0LL) ? "YES" : "NO") << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); solve(); }