roman to integer


Submit solution

Points: 35 (partial)
Time limit: 1.0s
Memory limit: 256M

Authors:
Problem type
Allowed languages
Java 19, Java 8

題目說明

給定一羅馬符字串,請將其轉為阿拉伯數字並輸出

輸入限制 字串

羅馬符對照表

Symbol       Value
I             1
V             5
X             10
L             50
C             100
D             500
M             1000

其中I可在VX前,為49

X可在LC前,為4090

C可在DM前,為400900

輸入

字串

輸出

整數數字

測資0輸入

II

測資0輸出

2

測資1輸入

XXVII

測資1輸出

27

Comments

There are no comments at the moment.