Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
这题的做法和前面一体interger to roman 类似 建一个dictionary 去查询。
1.先把string 反转
2. 用一个last去保存上一次的di...
分类:
编程语言 时间:
2015-01-30 10:53:17
阅读次数:
293
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
建两个list依次match 罗马数字。 比较特殊的是 一些有两位的罗马数字。
来自http://www.cnblogs.com/zuoyuan/p/377958...
分类:
编程语言 时间:
2015-01-30 10:51:44
阅读次数:
190
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
罗马数字规则:参考wiki:http://zh.wikipedia.org/wiki/%E7%BD%97%E9%A9%AC%E6%95%B0%E5%AD%97
1,...
分类:
其他好文 时间:
2015-01-30 09:19:22
阅读次数:
196
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
string intToRoman(int num) {
int numarr[] = {1, 4, 5, 9, 10, 40, 50, 90, 100, 400,...
分类:
其他好文 时间:
2015-01-29 15:55:56
阅读次数:
124
题目链接:Integer to Roman
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
这道题的要求是将整数转化成罗马数字,其中输入数据范围是1到3999。
罗马数字是最早的数字表示方式,比阿拉伯数字早2000多年,起源...
分类:
其他好文 时间:
2015-01-29 12:48:44
阅读次数:
181
题目链接:Roman to Integer
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
这道题的要求是将罗马数字转化成整数,其中输入数据范围是1到3999。
罗马数字是最早的数字表示方式,比阿拉伯数字早2000多年,起源...
分类:
其他好文 时间:
2015-01-29 12:48:40
阅读次数:
121
uva 539 The Settlers of Catan
Within Settlers of Catan, the 1995 German game of the year, players attempt to dominate an island by building roads, settlements and cities across its uncharted wilder...
分类:
其他好文 时间:
2015-01-29 12:45:04
阅读次数:
149
【题目】
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,...
分类:
其他好文 时间:
2015-01-27 21:59:43
阅读次数:
145
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
题目大意
给你个罗马数字,把它转换成一个int数。输入限定在[1, 3999]。
难度系数:容易
实现
一次性通过,:)
int getVal(c...
分类:
其他好文 时间:
2015-01-27 18:22:38
阅读次数:
160
当启动tomcat时候出现Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeou...
分类:
其他好文 时间:
2015-01-27 13:10:08
阅读次数:
127