結果
| 問題 | No.1586 Equal Array |
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2021-07-08 22:20:54 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 395 ms / 1,000 ms |
| コード長 | 362 bytes |
| 記録 | |
| コンパイル時間 | 3,457 ms |
| コンパイル使用メモリ | 81,496 KB |
| 実行使用メモリ | 52,624 KB |
| 最終ジャッジ日時 | 2026-03-22 13:48:38 |
| 合計ジャッジ時間 | 9,653 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long sum = 0;
for (int i = 0; i < n; i++) {
sum += sc.nextLong();
}
sc.close();
if (sum % n == 0) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
ks2m