Skip to content · ⁨コンテンツへスキップ⁩

Roman numerals

English

Roman numerals

Convert a Roman numeral to an int. The symbols are I=1, V=5, X=10, L=50, C=100, D=500, M=1000. Usually you add, but when a smaller symbol sits before a larger one you subtract it: IV is 4, IX is 9, MCMXCIV is 1994. Scanning from right to left makes the subtract rule easy — subtract any symbol smaller than the one to its right.

日本語

ローマ数字

ローマ数字をintに変換します。記号はI=1, V=5, X=10, L=50, C=100, D=500, M=1000です。通常は足しますが、小さな記号が大きな記号の前にある場合は引きます:IVは4、IXは9、MCMXCIVは1994です。右から左へスキャンすることで、引き算ルールが簡単になります。右隣より小さい記号があればすべて引き算します。

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP