結果

問題 No.405 ローマ数字の腕時計
ユーザー 双六双六
提出日時 2020-08-11 03:45:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 639 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 62,736 KB
最終ジャッジ日時 2024-04-17 16:57:45
合計ジャッジ時間 2,080 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
60,392 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 43 ms
60,240 KB
testcase_04 WA -
testcase_05 AC 44 ms
60,660 KB
testcase_06 AC 43 ms
61,492 KB
testcase_07 AC 43 ms
60,584 KB
testcase_08 WA -
testcase_09 AC 44 ms
60,636 KB
testcase_10 AC 43 ms
61,796 KB
testcase_11 AC 44 ms
61,064 KB
testcase_12 AC 45 ms
60,580 KB
testcase_13 AC 45 ms
60,908 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 45 ms
61,776 KB
testcase_17 AC 47 ms
61,852 KB
testcase_18 WA -
testcase_19 AC 44 ms
60,788 KB
testcase_20 AC 44 ms
60,648 KB
testcase_21 AC 44 ms
60,484 KB
testcase_22 AC 44 ms
60,740 KB
testcase_23 AC 44 ms
60,112 KB
testcase_24 AC 44 ms
60,180 KB
testcase_25 AC 43 ms
60,584 KB
testcase_26 AC 45 ms
60,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 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()
0