码迷,mamicode.com
首页 >  
搜索关键字:罗马数字    ( 376个结果
Integer to Roman -- leetcode
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
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
[leetcode]Integer to Roman
问题描述: 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
Leetcode: Roman to Integer
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
leetcode:Roman to Integer
将罗马数字转换成整型数字。前面已经介绍过罗马数字了这里就不赘述了。...
分类:其他好文   时间:2014-11-30 00:49:06    阅读次数:143
[LeetCode] Integer to Roman 整数转化成罗马数字
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.之前那篇文章写的是罗马数字转化成整数(http://www.cnblogs.com/gr...
分类:其他好文   时间:2014-11-26 16:20:50    阅读次数:244
Roman to Integer——罗马数字转变算法
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41486885 通过本文你可能学到的知识如下: (1)理解本题的解题思路,在以后类似的场景中,如果没有想到比较好的方法,可以考虑使用本文的方法,虽然效率不是特别高。 (2)能够对字符串的截取和HashMap相关操作有所学习。 解题思路如下: (1)这道题其实不难,可以用switch进行条件判断,并依据返回值累加求得结果。本文使用的是HashMa...
分类:编程语言   时间:2014-11-25 23:54:18    阅读次数:240
LeetCode: Roman to Integer 解题报告
Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.SOLUTION 1:思路:从后往前遍历罗马数字,如果某...
分类:其他好文   时间:2014-11-23 21:33:17    阅读次数:223
LeetCode: Regular Expression Matching 解题报告
Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.SOLUTION 1:思路:从后往前遍历罗马数字,如果某...
分类:其他好文   时间:2014-11-23 20:12:01    阅读次数:145
罗马数字转为阿拉伯数字
1 /* I:1 ; V-5;X-10;L-50;C-100;D-500;M-1000*/ 2 class Solution{ 3 vector tokens; 4 vector token_value; 5 public: 6 /*divide the strin...
分类:其他好文   时间:2014-10-27 22:45:06    阅读次数:288
376条   上一页 1 ... 32 33 34 35 36 ... 38 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!