正文

Roman Numerals 2006-06-20 18:25:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/elva6401/16070.html

分享到:

For those who are unfamiliar with Roman Numerals, here is a quick summary:
Each letter used in Roman numerals stands for a different number:


Roman Numeral Number
--------------------------
I 1
V 5
X 10
L 50
C 100
D 500
M 1000

A string of letters means that their values should be added together. For example, XXX = 10 + 10 + 10 = 30, and LXI = 50 + 10 + 1 = 61. If a smaller value is placed before a larger one,
we subtract instead of adding. For instance, IV = 5 − 1 = 4 and XC = 100 − 10 = 90.

  • Except for M, do not add more than three of the same letters together.
  • Subtract only powers of ten, such as I, X, or C. Writing VL for 45 is not allowed: write XLV instead.
  • Subtract only a single letter from a single numeral. Write VIII for 8, not IIX; 19 is XIX, not IXX.
  • Don't subtract a letter from another letter more than ten times greater. This means that you can only subtract I from V or X, and X from L or C, so MIM is illegal.

阅读(2251) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册