Type: RemoteJudge 1000ms 125MiB

[USACO2.2] 序言页码 Preface Numbering

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给定 nn,求 1n1 \sim n罗马数字 表示中,各个字符出现了多少次。

比如 n=5n = 5,表示为 I, II, III, IV, V。总共有 77 个 I 出现,22 个 V 出现。

输入格式

一个整数 nn

输出格式

每行一个字符和一个数字 kk,表示这个字符出现了 kk 次。字符必须按罗马数字表中的递增顺序输出。

5

I 7
V 2

提示

【数据范围】
对于 100%100\% 的数据,1n35001\le n \le 3500

翻译来自NOCOW

USACO 2.2

入门作业2

Not Claimed
Status
Done
Problem
18
Open Since
2026-2-5 0:00
Deadline
2026-2-25 0:00
Extension
24 hour(s)