結果
| 問題 |
No.1586 Equal Array
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2021-07-08 22:20:54 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 699 ms / 1,000 ms |
| コード長 | 362 bytes |
| コンパイル時間 | 2,055 ms |
| コンパイル使用メモリ | 74,444 KB |
| 実行使用メモリ | 59,716 KB |
| 最終ジャッジ日時 | 2024-07-01 12:38:47 |
| 合計ジャッジ時間 | 13,392 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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