結果

問題 No.99 ジャンピング駒
ユーザー 👑 horiesinitihoriesiniti
提出日時 2016-06-14 03:17:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 156 ms / 5,000 ms
コード長 137 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 18,560 KB
最終ジャッジ日時 2024-04-17 19:28:21
合計ジャッジ時間 1,697 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 156 ms
18,560 KB
testcase_01 AC 153 ms
18,560 KB
testcase_02 AC 142 ms
18,560 KB
testcase_03 AC 141 ms
18,560 KB
testcase_04 AC 143 ms
18,560 KB
testcase_05 AC 141 ms
18,560 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

oddeven=[0,0]

n=STDIN.gets.to_i
xs=STDIN.gets.split(" ")
xs.size.times do |i|
	oddeven[xs[i].to_i%2]+=1
end
puts oddeven.max-oddeven.min
0