結果

問題 No.671 1000000007
ユーザー object1234object1234
提出日時 2019-01-31 21:22:59
言語 Ruby
(3.3.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 11,520 KB
実行使用メモリ 15,344 KB
最終ジャッジ日時 2023-08-11 00:38:19
合計ジャッジ時間 2,207 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,344 KB
testcase_01 AC 78 ms
15,036 KB
testcase_02 AC 79 ms
15,264 KB
testcase_03 AC 79 ms
15,132 KB
testcase_04 AC 81 ms
15,108 KB
testcase_05 AC 81 ms
15,132 KB
testcase_06 AC 80 ms
15,156 KB
testcase_07 AC 80 ms
15,128 KB
testcase_08 AC 79 ms
15,304 KB
testcase_09 AC 79 ms
15,344 KB
testcase_10 AC 79 ms
15,116 KB
testcase_11 AC 79 ms
15,092 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def zero_count(str)
    str.chars.delete_if { |v| v.to_i > 0}.join.length
end
res = zero_count("1000000007") - zero_count(gets.chomp)
puts res < 0 ? -res : res
0