🔟 Roman Numeral Converter
📐 工作原理與說明
轉換採用「符號表貪心」:按數值從大到小遍歷符號對(如 1000/M、900/CM、500/D、400/CD、100/C、90/XC、50/L、40/XL、10/X、9/IX、5/V、4/IV、1/I),只要當前數 ≥ 該數值就追加對應符號並從數中減去,直到歸零;同時把每一步記成「符號=數值」用加號連成拆解式。輸入超出 1–3999 時提示超出範圍
Bidirectional conversion between Arabic numbers 1–3999 and Roman numerals with standard-form validation (including subtractive notation; non-standard repeats such as IIII are rejected).
MMXXIV
📖 羅馬數字符號
I
1
V
5
X
10
L
50
C
100
D
500
M
1000
規則:相同符號最多連續 3 次。4 寫為 IV(5-1),9 寫為 IX(10-1)。40=XL,90=XC,400=CD,900=CM。
📚 深度解析:羅馬數字轉換
💡 常見使用場景
- 與 it/roman-numeral 同,整數↔羅馬。
- 看版權年份或鐘錶盤用羅馬數字時快速轉換,讀寫不出錯。
轉換
1994 → MCMXCIV;2026 → MMXXVI。
❓ 常見問題(FAQ)
- 有 0 嗎?
- 無,羅馬數字最小 I=1。
- 羅馬數字有 0 嗎?
- 沒有。羅馬數字系統不含 0,取值範圍通常為 1–3999;更大的數需用上劃線等擴充套件記法,本工具不支援。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Basic symbols | I, V, X, L, C, D and M stand for 1, 5, 10, 50, 100, 500 and 1000 | 羅馬數字標準寫法(含減法規則) |
| Subtractive rule | a smaller symbol before a larger one subtracts, as in IV and IX | 羅馬數字標準寫法(含減法規則) |
| Practical range | standard forms stop at 3999 and need overlining beyond that | 羅馬數字標準寫法(含減法規則) |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準