結果
問題 | No.99 ジャンピング駒 |
ユーザー |
|
提出日時 | 2017-04-11 23:08:40 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 655 ms / 5,000 ms |
コード長 | 305 bytes |
コンパイル時間 | 1,985 ms |
コンパイル使用メモリ | 74,212 KB |
実行使用メモリ | 48,220 KB |
最終ジャッジ日時 | 2024-07-18 09:08:53 |
合計ジャッジ時間 | 6,634 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
import java.util.Scanner; class N099{ public static void main(String args[]){ Scanner s = new Scanner(System.in); int n = s.nextInt(); int gu = 0, ki = 0; for(int i = 0; i < n; i++){ if(s.nextInt() % 2 == 0){ gu++; }else{ ki++; } } System.out.println(Math.abs(gu - ki)); } }