結果

問題 No.2836 Comment Out
ユーザー ks2mks2m
提出日時 2024-08-09 22:31:41
言語 Java
(openjdk 23)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 603 bytes
コンパイル時間 2,470 ms
コンパイル使用メモリ 74,772 KB
実行使用メモリ 58,144 KB
最終ジャッジ日時 2024-08-09 22:31:56
合計ジャッジ時間 14,437 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 52
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] sa = br.readLine().split(" ");
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(sa[i]);
		}
		br.close();

		int min = 1000000007;
		for (int i = 0; i < n; i++) {
			min = Math.min(min, a[i]);
		}
		if (min <= 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
0