結果

問題 No.1183 コイン遊び
ユーザー shi-moshi-mo
提出日時 2020-09-28 23:41:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,095 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 11,212 KB
実行使用メモリ 230,404 KB
最終ジャッジ日時 2023-09-15 17:56:10
合計ジャッジ時間 22,286 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,304 KB
testcase_01 AC 81 ms
15,200 KB
testcase_02 AC 80 ms
15,124 KB
testcase_03 AC 81 ms
15,156 KB
testcase_04 AC 81 ms
15,140 KB
testcase_05 AC 81 ms
15,088 KB
testcase_06 AC 81 ms
15,096 KB
testcase_07 AC 81 ms
15,132 KB
testcase_08 AC 83 ms
15,172 KB
testcase_09 AC 83 ms
15,152 KB
testcase_10 AC 98 ms
17,228 KB
testcase_11 AC 128 ms
26,196 KB
testcase_12 AC 553 ms
123,496 KB
testcase_13 AC 531 ms
117,812 KB
testcase_14 AC 792 ms
182,124 KB
testcase_15 AC 814 ms
188,636 KB
testcase_16 AC 819 ms
188,840 KB
testcase_17 AC 817 ms
188,908 KB
testcase_18 AC 829 ms
191,580 KB
testcase_19 AC 827 ms
191,528 KB
testcase_20 AC 825 ms
191,548 KB
testcase_21 AC 504 ms
119,084 KB
testcase_22 AC 495 ms
118,716 KB
testcase_23 AC 579 ms
169,036 KB
testcase_24 AC 503 ms
119,288 KB
testcase_25 AC 821 ms
191,532 KB
testcase_26 AC 823 ms
191,536 KB
testcase_27 AC 821 ms
191,344 KB
testcase_28 AC 830 ms
191,388 KB
testcase_29 AC 513 ms
119,348 KB
testcase_30 AC 1,095 ms
230,404 KB
testcase_31 AC 825 ms
191,360 KB
testcase_32 AC 832 ms
191,420 KB
testcase_33 AC 817 ms
188,840 KB
testcase_34 AC 816 ms
188,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets # discard N
a = gets.split.join('').to_i(2)
b = gets.split.join('').to_i(2)
xor = (a ^ b).to_s(2)
xor.gsub!(/1+/, '1')
xor.gsub!(/0+/, '')
puts xor.size
0