結果

問題 No.405 ローマ数字の腕時計
ユーザー mesh1nek0x0mesh1nek0x0
提出日時 2018-08-12 23:20:08
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 11,812 KB
実行使用メモリ 16,040 KB
最終ジャッジ日時 2023-10-24 16:25:27
合計ジャッジ時間 3,746 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
16,040 KB
testcase_01 AC 80 ms
16,040 KB
testcase_02 AC 82 ms
16,040 KB
testcase_03 AC 79 ms
16,040 KB
testcase_04 AC 82 ms
16,040 KB
testcase_05 AC 80 ms
16,040 KB
testcase_06 WA -
testcase_07 AC 78 ms
16,040 KB
testcase_08 AC 79 ms
16,040 KB
testcase_09 WA -
testcase_10 AC 81 ms
16,040 KB
testcase_11 AC 78 ms
16,040 KB
testcase_12 WA -
testcase_13 AC 80 ms
16,040 KB
testcase_14 AC 80 ms
16,040 KB
testcase_15 AC 81 ms
16,040 KB
testcase_16 AC 84 ms
16,040 KB
testcase_17 WA -
testcase_18 AC 79 ms
16,040 KB
testcase_19 AC 80 ms
16,036 KB
testcase_20 AC 80 ms
16,036 KB
testcase_21 AC 79 ms
16,036 KB
testcase_22 AC 80 ms
16,040 KB
testcase_23 AC 82 ms
16,040 KB
testcase_24 AC 80 ms
16,040 KB
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/bin/ruby
watch = {
    "1" => "I",
    "2" => "II",
    "3" => "III",
    "4" => "IIII",
    "5" => "V",
    "6" => "VI",
    "7" => "VII",
    "8" => "VIII",
    "9" => "IX",
    "10" => "X",
    "11" => "XI",
    "12" => "XII"}

input = gets.chomp.split(' ')
s1 = input[0]
t = input[1].to_i

puts watch["#{(watch.key(s1).to_i + t) % 12}"]
0