結果

問題 No.1250 汝は倍数なりや?
ユーザー forest3
提出日時 2020-11-14 22:37:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 109 ms / 1,000 ms
コード長 254 bytes
コンパイル時間 2,164 ms
コンパイル使用メモリ 167,612 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-23 00:52:24
合計ジャッジ時間 5,728 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	int N, H;
	cin >> N >> H;
	for( int i = 0; i < N; i++ ) {
		int A;
		cin >> A;
		int gcd = __gcd( A, H );
		H /= gcd;
	}
	string ans = "NO";
	if( H == 1 ) ans = "YES";

	cout << ans << endl;
}
0