結果

問題 No.405 ローマ数字の腕時計
ユーザー konabe
提出日時 2017-12-22 17:24:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 429 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-17 23:13:25
合計ジャッジ時間 2,010 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

roma_num = ["I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"]

def toString(i):
    if 0 < i < 13:
        return roma_num[i-1]
    else:
        print("error on toString")
        return "error"

def toNum(s):
    for i, rom in enumerate(roma_num):
        if s == rom:
            return i+1
    return -1

S1, T = input().split()
s = toNum(S1)
res = s + int(T)
t = toString(res%12 if res != 0 else 12)
print(t)
0