結果
| 問題 | No.1250 汝は倍数なりや? |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-15 10:02:59 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 1,000 ms |
| コード長 | 305 bytes |
| 記録 | |
| コンパイル時間 | 936 ms |
| コンパイル使用メモリ | 178,516 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-10 06:27:21 |
| 合計ジャッジ時間 | 3,868 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 49 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
long long H;
cin>>H;
long long A[202020];
for(int i=1;i<=N;i++)cin>>A[i];
long long count=1;
for(int i=1;i<=N;i++)count=(count*(A[i]))%H;
if(count==0)cout<<"YES";
else cout<<"NO";
}