結果
| 問題 |
No.405 ローマ数字の腕時計
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 21:11:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 412 bytes |
| コンパイル時間 | 267 ms |
| コンパイル使用メモリ | 82,296 KB |
| 実行使用メモリ | 53,540 KB |
| 最終ジャッジ日時 | 2025-03-20 21:11:13 |
| 合計ジャッジ時間 | 2,316 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
# Read input s1, t = input().split() t = int(t) # List of Roman numerals in order from 1 to 12 o'clock romans = ['I', 'II', 'III', 'IIII', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII'] # Find current index of S1 current_index = romans.index(s1) # Calculate new index with modulo 12 to handle cyclicity new_index = (current_index + t) % 12 # Output the corresponding Roman numeral print(romans[new_index])
lam6er