結果

問題 No.593 4進FizzBuzz
ユーザー maimai
提出日時 2017-08-01 06:48:00
言語 Ruby
(3.2.2)
結果
AC  
実行時間 188 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 11,412 KB
実行使用メモリ 111,144 KB
最終ジャッジ日時 2023-08-04 16:31:37
合計ジャッジ時間 7,094 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,036 KB
testcase_01 AC 81 ms
15,168 KB
testcase_02 AC 80 ms
15,168 KB
testcase_03 AC 77 ms
15,316 KB
testcase_04 AC 80 ms
15,172 KB
testcase_05 AC 80 ms
15,124 KB
testcase_06 AC 79 ms
15,372 KB
testcase_07 AC 78 ms
15,096 KB
testcase_08 AC 79 ms
15,148 KB
testcase_09 AC 78 ms
15,116 KB
testcase_10 AC 79 ms
15,248 KB
testcase_11 AC 80 ms
15,164 KB
testcase_12 AC 81 ms
15,036 KB
testcase_13 AC 81 ms
15,120 KB
testcase_14 AC 80 ms
15,248 KB
testcase_15 AC 79 ms
15,336 KB
testcase_16 AC 183 ms
110,892 KB
testcase_17 AC 183 ms
111,120 KB
testcase_18 AC 185 ms
111,144 KB
testcase_19 AC 185 ms
111,084 KB
testcase_20 AC 180 ms
110,960 KB
testcase_21 AC 184 ms
111,128 KB
testcase_22 AC 186 ms
110,924 KB
testcase_23 AC 180 ms
111,044 KB
testcase_24 AC 183 ms
110,992 KB
testcase_25 AC 183 ms
111,096 KB
testcase_26 AC 186 ms
110,976 KB
testcase_27 AC 188 ms
111,016 KB
testcase_28 AC 183 ms
110,972 KB
testcase_29 AC 185 ms
110,928 KB
testcase_30 AC 182 ms
111,096 KB
testcase_31 AC 181 ms
111,080 KB
testcase_32 AC 184 ms
111,012 KB
testcase_33 AC 181 ms
111,144 KB
testcase_34 AC 181 ms
111,116 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

str = gets.chomp!
abort "EOF" unless !gets
abort "Format error" unless str=~/^[0-3]+$/

e = str.to_i(4)

puts e%15 == 0 ? "FizzBuzz" : (e%5 == 0 ? "Buzz" : (e%3 == 0 ? "Fizz" : str))
0