結果
問題 |
No.405 ローマ数字の腕時計
|
ユーザー |
![]() |
提出日時 | 2020-08-11 03:45:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 639 bytes |
コンパイル時間 | 475 ms |
コンパイル使用メモリ | 81,900 KB |
実行使用メモリ | 62,340 KB |
最終ジャッジ日時 | 2024-10-09 11:05:52 |
合計ジャッジ時間 | 2,730 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 7 |
ソースコード
# import sys; input = sys.stdin.buffer.readline # sys.setrecursionlimit(10**7) from collections import defaultdict con = 10 ** 9 + 7; INF = float("inf") import copy def getlist(): return list(map(int, input().split())) #処理内容 def main(): S1, T = input().split() time = 0 for i in S1: if i == "X": time += 10 elif i == "V": time += 5 elif i == "I": time += 1 T = int(T) time += T if time % 12 == 0: print("XII") return time %= 12 ans = "" ans += int(time // 10) * "X" time = time % 10 ans += int(time // 5) * "V" time = time % 5 ans += time * "I" print(ans) if __name__ == '__main__': main()