結果

問題 No.99 ジャンピング駒
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-02-01 14:26:03
言語 Ruby
(3.3.0)
結果
AC  
実行時間 153 ms / 5,000 ms
コード長 103 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 11,936 KB
実行使用メモリ 24,832 KB
最終ジャッジ日時 2023-10-19 00:00:05
合計ジャッジ時間 1,836 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n = gets.chomp.to_i
x = gets.chomp.split.map(&:to_i).map{|i| i % 2}

puts (x.count(0) - x.count(1)).abs
0