結果
| 問題 | No.99 ジャンピング駒 |
| コンテスト | |
| ユーザー |
spacia
|
| 提出日時 | 2016-01-02 08:57:18 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 172 ms / 5,000 ms |
| コード長 | 548 bytes |
| 記録 | |
| コンパイル時間 | 1,486 ms |
| コンパイル使用メモリ | 82,480 KB |
| 実行使用メモリ | 51,612 KB |
| 最終ジャッジ日時 | 2026-04-07 19:30:26 |
| 合計ジャッジ時間 | 3,473 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
import java.io.*;
import java.util.*;
class Main99 {
public static void out (Object o) {
System.out.println(o);
}
public static void main (String[] args) throws IOException {
BufferedReader br =
new BufferedReader(new InputStreamReader(System.in));
int cnt1 = 0 , cnt2 = 0;
int n = Integer.parseInt(br.readLine());
String[] line = br.readLine().split(" ");
for (int i = 0; i < n; i++) {
int m = Integer.parseInt(line[i]);
if (m % 2 == 0)
cnt1++;
else
cnt2++;
}
out(Math.abs(cnt1 - cnt2));
}
}
spacia