2015年4月16日
摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.简单的字符转化,将读取的字符每一位转化为对应数字,再计算。时间:58ms代码如下:cla... 阅读全文
posted @ 2015-04-16 22:46 NealCaffrey989 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.将不同罗马字符和对应的数字做成字典,然后将依次转化。时间:55ms代码如下:class ... 阅读全文
posted @ 2015-04-16 22:45 NealCaffrey989 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文
posted @ 2015-04-16 22:44 NealCaffrey989 阅读(96) 评论(0) 推荐(0) 编辑