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

建议使用的浏览器:

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

5920:Ugly Problem

Special Judge 特殊评判
题目描述
Everyone hates ugly problems.

You are given a positive integer. You must represent that number by sum of palindromic numbers.

A palindromic number is a positive integer such that if you write out that integer as a string in decimal without leading zeros, the string is an palindrome. For example, 1 is a palindromic number and 10 is not.
输入解释
In the first line of input, there is an integer T denoting the number of test cases.

For each test case, there is only one line describing the given integer s ($1\leq s \leq 10^{1000}$).
输出解释
For each test case, output “Case #x:” on the first line where x is the number of that test case starting from 1. Then output the number of palindromic numbers you used, n, on one line. n must be no more than 50. �阤n output n lines, each containing one of your palindromic numbers. Their sum must be exactly s.
输入样例
2
18
1000000000000
输出样例
Case #1:
2
9
9
Case #2:
2
999999999999
1

提示
9 + 9 = 18
999999999999 + 1 = 1000000000000
来自杭电HDUOJ的附加信息
Recommend wange2014

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

源链接: HDU-5920

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

共提交 0

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