結果

問題 No.99 ジャンピング駒
ユーザー nonokai10nonokai10
提出日時 2018-03-11 01:04:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 94 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 19,584 KB
最終ジャッジ日時 2024-04-23 00:49:50
合計ジャッジ時間 1,696 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
19,328 KB
testcase_01 AC 111 ms
19,328 KB
testcase_02 AC 113 ms
19,200 KB
testcase_03 AC 112 ms
19,584 KB
testcase_04 AC 118 ms
19,456 KB
testcase_05 AC 120 ms
19,328 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.split.map(&:to_i)
o = a.count{|i| i.odd?}
e = n - o
p n - [o,e].min * 2
0