結果

問題 No.1250 汝は倍数なりや?
ユーザー xRS43BofaUEZ5gc
提出日時 2021-03-11 09:05:57
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 391 bytes
コンパイル時間 3,244 ms
コンパイル使用メモリ 74,384 KB
実行使用メモリ 53,488 KB
最終ジャッジ日時 2024-10-12 23:23:58
合計ジャッジ時間 20,356 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {

	    	Scanner sc = new Scanner(System.in);
	    	long n = sc.nextLong();
	    	long h = sc.nextLong();
	    	long ans = 1;
	    	for (int i = 0; i < n; i ++) {
	    		ans = ans * sc.nextLong() % h;
	    	}

	    	System.out.println(ans == 0? "Yes" : "No");
	    	}

	    }
0