結果
| 問題 | No.99 ジャンピング駒 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-23 19:51:19 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 377 ms / 5,000 ms |
| コード長 | 483 bytes |
| 記録 | |
| コンパイル時間 | 2,610 ms |
| コンパイル使用メモリ | 82,776 KB |
| 実行使用メモリ | 138,704 KB |
| 最終ジャッジ日時 | 2026-04-02 15:37:20 |
| 合計ジャッジ時間 | 8,342 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
import java.util.Scanner;
public class Main_yukicoder99 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int odd = 0;
int even = 0;
for (int i = 0; i < n; i++) {
int x = sc.nextInt();
if (x % 2 == 0) {
even++;
} else {
odd++;
}
}
System.out.println(Math.abs(even - odd));
sc.close();
}
}