QOJ.ac

QOJ

Limite de temps : 2.0 s Limite de mémoire : 2048 MB Points totaux : 100

#16046. 数字把戏

Statistiques

Lukas 准备做一场关于实用数学魔术的演讲。例如,要计算一个数的平方根,你只需要去掉这个数的前半部分。为了说服观众,他使用了经过充分检验的“例证法”:$\sqrt{25} = 5$ 且 $\sqrt{5776} = 76$,所以这个方法显然是行之有效的。而要将一个数乘以 $X = 2.6$,你只需要将它的首位数字移动到末尾,例如 $135 \times 2.6 = 351$ 以及 $270270 \times 2.6 = 702702$。

Lukas 想要证明这最后一个方法对任意的 $X$ 都适用。为此,他会让观众给出 $X$ 的值,然后向他们展示该方法适用的乘法示例。Lukas 注意到他不能随便挑选数字作为例子,所以现在他需要你的帮助。你能写一个程序,在给定 $X$ 的情况下,输出一个正整数列表,使得这些数乘以 $X$ 的结果等价于将它们的首位数字移动到末尾吗?Lukas 不喜欢非常大的数字,所以不要列出任何超过 8 位的数字。

输入格式

输入仅包含一个实数 $X$($1 \le X < 1000$),小数点后最多有 4 位数字。

输出格式

输出所有小于 $10^8$ 且能使 Lukas 的第二个魔术生效的正整数列表。按升序排列,每行输出一个数字。如果列表为空,则输出 No solution

样例

样例输入 1

2.6

样例输出 1

135
270
135135
270270

样例输入 2

3.1416

样例输出 2

No solution

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.