Preface Numbering罗马数字的处理,问从1-N,各个IVX...什么的出现了多少次。我们可以用IVX表示出1-9XLC表示出10-90CDM表示出100-900统计出怎么出现的。接下来从高位往下减来表示就好了。#include using namespace std;char dir[...
分类:
其他好文 时间:
2015-07-18 02:05:06
阅读次数:
122
题目:
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.要把罗马数字转换为整数, 罗马数字自行百度code:class Solution
{
public:
int romanToInt(string s)
{...
分类:
其他好文 时间:
2015-07-14 23:58:07
阅读次数:
401
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.【罗马数字】1~9: {"I", "II", "III", "IV", "V", "VI...
分类:
其他好文 时间:
2015-07-13 00:46:19
阅读次数:
152
题目:
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
题意:
给定一个整数,将其转化为罗马数字。
题目给定的输入保证在1-3999之间。
算法分析:
参考了博客http://www.cnbl...
分类:
编程语言 时间:
2015-07-09 13:20:42
阅读次数:
151
题目:
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
题意:
给定一个罗马数字,将其转化为整数。
给定的输入保证在1-3999之间
算法分析:
* 罗马数字规则:
* 1, 罗马...
分类:
编程语言 时间:
2015-07-09 11:21:07
阅读次数:
111
1. Question给定整数,将其转化为罗马数。输入在1到3999之间。罗马数字的几个基本特点:I:1, V:5, X:10, L:50, C:100, D:500, M:1000相加:数字连写、小的数字在大的数字右边相减:小的数字在大的数字左边罗马数字的限制特点:数字连写仅限I, X, C(即1...
分类:
其他好文 时间:
2015-06-23 22:58:12
阅读次数:
125
题目意思:罗马数字转int思路:字符串从最后一位开始读,IV:+5-1 1 class Solution { 2 public: 3 int romanToInt(string s) { 4 map mymap; 5 mymap['I']=1; 6 ...
分类:
其他好文 时间:
2015-06-17 23:00:27
阅读次数:
134
题目意思:1-3999转罗马数字思路:从大往小减 ps:这题有点蛋疼 1 class Solution { 2 public: 3 string intToRoman(int num) { 4 string a[]={"I","IV","V","IX","X","XL","...
分类:
其他好文 时间:
2015-06-17 21:20:36
阅读次数:
121
没认真想,看到一种方法,应该算是最简单的方法了吧基础知识:罗马数字是由字符I,V,X,L,C,D,M等等表示的,其中I = 1;V = 5;X = 10;L = 50;C = 100;D = 500;M = 1000;接下来应该是V开始的重复,但是上面要加一个横线,表示对应数字的1000倍。个位应该...
分类:
其他好文 时间:
2015-06-11 18:21:36
阅读次数:
92
CSS符号属性: list-style-type:none; /*不编号*/list-style-type:decimal; /*阿拉伯数字*/list-style-type:lower-roman; /*小写罗马数字*/list-style-type:upper-roman; /*大写罗马数字*/...
分类:
Web程序 时间:
2015-06-05 06:09:41
阅读次数:
172