当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3390:Hotel

题目描述
A new hotel has been built in a city where the citizens believe that the number 13 brings bad luck. The hotel has n rooms which are numbered from 1 to n inclusive. One of the main properties of a room is its unlucky value which depends on the room number. Only number whose decimal forms contain the substring "13" will be considered to be unlucky numbers. For example, 13, 132, 1313, 9130 are unlucky numbers, but 1, 3, 31, 103, 123123 are not. The unlucky value of a room is the square of the room number if the room number is unlucky, and zero otherwise.
A hotel's unlucky value equals the sum of the unlucky value of all its rooms. Help the manager to calculate the unlucky value of this hotel.
输入解释
The first line contains an integer T (T<=100) indicating the number of test cases. T lines follows, each line contains an integer k (1<=k<=100) indicating that this hotel has 10^k (the k-th power of 10) rooms.
输出解释
For each test case, print the case number and the answer % 100003 in a single line where the answer is the unlucky value of this hotel. Follow the format of the sample output please.
输入样例
3
1
2
3
输出样例
Case 1: 0
Case 2: 169
Case 3: 49582
来自杭电HDUOJ的附加信息
Author hanshuai@whu
Recommend notonlysuccess

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3390

最后修改于 2020-10-25T23:03:06+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)