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

建议使用的浏览器:

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

2274:Magic WisKey

题目描述
On New Year Festival, Liu Qian’s magic impressed on little WisKey’s heart and he wants to learn some magic to make himself stronger.
  One day, he met a cowman named LinLe. Linle is very nice, he told little WisKey the mysteries of magic. Now, little WisKey began to perform the magic to you.
  “Hello, Everybody. I have five decimal numbers named a, b, c, d, e, (0 <= a, b, c, d, e <= 9) and I rearranged them, and then combined them into a number, for example <a, b, c, d, e> = a*10000 + b*1000 + c*100 + d*10 + e*1. You know the number of permutations is 5! = 120. So you have 120 numbers in your hands, you can pick a number N from the 120 numbers and calculate the sum S of remain 119 numbers. AHA~, If you tell me the S, I can guess the N~!”
  It’s easy? Okay, you can challenge this.

输入解释
Each line will contain an integer S. Process to end of file.
输出解释
For each case, output all possible N, print the number N with 5 digits, including the leading zeros, one line per case.
I promise every case have one solution at least. If have many N, please output them from small to large in one line, separate them with a blank space.

输入样例
2933266
6392217
4245386
输出样例
00038
07719
21238
来自杭电HDUOJ的附加信息
Recommend lcy

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

源链接: HDU-2274

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

共提交 0

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