sadfghjk
来源:互联网 发布:苹果社交软件色情 编辑:程序博客网 时间:2024/06/06 00:53
public class Solution { public string IntToRoman(int num) { string[][] roman = new string[][]{ new string[]{"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}, new string[]{"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"}, new string[]{"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"}, new string[]{"", "M", "MM", "MMM"} }; string result = ""; int digit = 0; while (num != 0) { int remain = num % 10; result = roman[digit][remain] + result; digit++; num /= 10; } return result; }}
阅读全文
0 0
- sadfghjk
- Android仿京东评论多图片选择器
- 字符串大小写分开打印 -- 漫漫算法路 刷题篇
- Linux下判断磁盘是SSD还是HDD的几种方法
- 回归评价指标:均方误差根(RMSE)和R平方(R2)
- AMS之内存管理
- sadfghjk
- java内存模型
- Birthday present
- Es6 类的关键 super、static、constructor、new.targe
- (多核DSP快速入门)1.创建简单的多核DSP项目HelloWorld
- java中的反射机制
- python urlopen 超时
- 82. Remove Duplicates from Sorted List II
- Vue.js安装配置