結果
| 問題 | No.99 ジャンピング駒 |
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-07-09 17:02:48 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 378 ms / 5,000 ms |
| + 108µs | |
| コード長 | 314 bytes |
| 記録 | |
| コンパイル時間 | 1,445 ms |
| コンパイル使用メモリ | 85,128 KB |
| 実行使用メモリ | 50,236 KB |
| 最終ジャッジ日時 | 2026-09-15 14:21:28 |
| 合計ジャッジ時間 | 5,614 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
int n=sc.nextInt();
int o=0,e=0;
for(int i=0;i<n;i++){
int x=sc.nextInt();
if(x%2==0) e++;
else o++;
}
System.out.println(Math.abs(o-e));
}
}
}
mits58