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

建议使用的浏览器:

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

2844:Sum and Product

Special Judge 特殊评判
题目描述
For a sequence of N integers A1, A2, ... , AN, we can calculate their sum S and product P easily. With given N, S and P, can you find out the sequence A1, A2, ... , AN?
输入解释
The input only contains a line with three integers N, S and P. Here N is positive and not more than 1000000, and the absolute values of S and P do not exceed 150000000.
输出解释
Just output "No solution" if there is no such sequence, or you may output any solution with N integers A1, A2, ... , AN, separated by just one space.
输入样例
sample input#1
2 4 3
sample input#2
4 4 2
输出样例
sample output#1
1 3
sample output#2
No solution

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-2844

最后修改于 2020-10-29T06:45:39+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
3000 131072