Roman to Integer, Integer to Roman

Given an integer, convert it to a roman numeral.

Input is guaranteed to be within the range from 1 to 3999.

Given a roman numeral, convert it to an integer.

Input is guaranteed to be within the range from 1 to 3999.

第一题中,用两个数组储存Roman Char和对应的数值,然后用i循环查询,也是不错的办法,不必要一定把全部数据放在一个object里面。

A single golf clap? Or a long standing ovation?

By clapping more or less, you can signal to us which stories really stand out.