結果

問題 No.99 ジャンピング駒
ユーザー wonda_t_coffee
提出日時 2020-02-01 14:26:03
言語 Ruby
(3.4.1)
結果
AC  
実行時間 153 ms / 5,000 ms
コード長 103 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 21,248 KB
最終ジャッジ日時 2024-09-18 19:59:04
合計ジャッジ時間 1,721 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
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