- 博客(4)
- 资源 (4)
- 收藏
- 关注
原创 罗马到数字的转换程序 python
import re, itertoolsdef fromroman(RomanChar): Pattern = "^(M{0,3})(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$" CharList = list(re.search(Pattern, RomanChar).groups()) return int(redu
2015-04-16 21:46:35
314
原创 罗马到数字转换 erlang
-module(fromroman).-compile(export_all).fromroman(RomanChar) -> Pattern = "^(M{0,3})(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$", {match, RomanList} = re:run(RomanChar, Pattern, [{ca
2015-04-16 21:45:57
229
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅