Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
class Solution {
public:
string intToRoman(int num) {
char symbol[] = {'I', ...
分类:
其他好文 时间:
2014-12-18 12:03:50
阅读次数:
162
标题:Roman to Integer通过率:34.1%难度:简单Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.这个题整体不是很难,就...
分类:
其他好文 时间:
2014-12-15 23:24:40
阅读次数:
211
HDU Today
Time Limit : 15000/5000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 6 Accepted Submission(s) : 1
Font: Times New Roman | Verdana | Georgia
F...
分类:
其他好文 时间:
2014-12-12 20:53:31
阅读次数:
208
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999
罗马数字计数方法:
基本字符
I
V
X
L
C
D
M
相应的阿拉...
分类:
其他好文 时间:
2014-12-12 16:40:50
阅读次数:
188
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.分析:这道题参考leetcode.pdf的解法,代码简洁,处理的巧妙。值得借鉴的几点如下...
分类:
其他好文 时间:
2014-12-09 21:21:14
阅读次数:
134
问题描述:
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
基本思路:
熟悉罗马数字和阿拉伯数字的转换规则,并找出规律。写出程序。 此题重点在提出规律。
阿拉伯数字到罗马数字的映射可以参考http://baike....
分类:
其他好文 时间:
2014-12-04 19:59:40
阅读次数:
214
美素数
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 23 Accepted Submission(s) : 4
Font: Times New Roman | Verdana | Georgia
Font Size: ← ...
分类:
其他好文 时间:
2014-12-04 18:07:38
阅读次数:
271
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.分析:首先我们熟悉下Roman数字组成规则:罗马数字一共有7个符号,'I':1, 'V'...
分类:
其他好文 时间:
2014-12-02 22:13:38
阅读次数:
161
题目:约瑟夫环变形,每次第k个出去后,他后面的第k个人站到他的位置,然后从这个位置继续;
现在你的编号,是1号,问从几号开始你回剩到最后。
分析:数论,模拟。直接模拟计算即可。
设从x位置开始则,最后剩下的人是s(编号0~n-1)有,你的新编号为m-x+1 = s,则x = m-s+1。
说明:看错题了,输出从1开始数的答案,WA了2次。...
分类:
其他好文 时间:
2014-12-01 17:38:10
阅读次数:
219
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Question:Given an integer, convert it to a r...
分类:
其他好文 时间:
2014-12-01 11:25:38
阅读次数:
191