kata

package
v0.0.0-...-1638f32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Solution

func Solution(number int) string

Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1,000 输入:一个数字num 输出:一个字符串roman 条件: (1)roman是num的罗马数字串 (2)1 <= num <= 3999 (3)不会出现多于3个相同罗马字母进行表示的情况,进一步展开: (3-1)4不表示为IIII而表示为IV;9不表示为VIIII而表示为IX (3-2)40不表示为XXXX而表示为XL;90不表示为LXXXX而表示为XC (3-3)400不表示为CCCC而表示为CD;900不表示为DCCCC而表示为CM 因为题目给出的取值范围最大到3999,所以4000和9000不予考虑

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL