結果
| 問題 |
No.1250 汝は倍数なりや?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-09 22:13:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,207 bytes |
| コンパイル時間 | 1,573 ms |
| コンパイル使用メモリ | 167,344 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-20 12:02:22 |
| 合計ジャッジ時間 | 3,317 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 WA * 15 |
ソースコード
/*******************************
* BASMILLAHHIR RAHMANNIR RAHIM *
* MD SHAHINUR RAHMAN *
* DATE: 05/oct/2020 *
* DEPT. OF CSE *
* LEADING UNIVERSITY, SYLHET *
*******************************/
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<string>
#include<stdlib.h>
#include<math.h>
#define shahin std::ios_base::sync_with_stdio(false); std::cin.tie(NULL);
#define ll long long
#define pb push_back
#define sz(x) (int)(x).size()
const int nax=1000*1007;
const int mod = 1e9 + 7;
int ar[120][120];
using namespace std;
char wcz[nax];
bool fu(int a, int b){
return (a>b);
}
int gcd(int x,int y){
return x?gcd(y%x, x):y;
}
void fun(){
ll n,h;
cin >> n >> h;
ll a[n],sum=1;
for(int i=0;i<n;i++){
cin >> a[i];
sum *= a[i];
}
if(sum%h==0 || h%sum==0)cout << "YES";
else cout << "NO";
}
int main()
{
shahin
/* ll tc,i=1,sum=0,A=0,B=0;
cin >> tc;
while(tc--)
{
//cout << "Case " << i << ": ";
fun();
//i++;
}*/
fun();
}