結果
| 問題 |
No.405 ローマ数字の腕時計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-22 17:28:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 445 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-17 23:13:29 |
| 合計ジャッジ時間 | 1,738 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 27 |
ソースコード
roma_num = ["I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"]
def toString(i):
print(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%12 != 0 else 12)
print(t)