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

建议使用的浏览器:

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

6937:Yiding Number

题目描述
A positive integer is called a "$Yiding Number$" when it can be obtained by one of the following two rules.

Rule $1$: The positive integer $1$ is a "$Yiding Number$".
Rule $2$: If $n$ is a "$Yiding Number$", then $5n+13$, $13n+5$, $5n-13$, $13n-5$ are also "$Yiding Numbers$".

Now, given a positive integer n, please determine it is a "Yiding Number" or not.
输入解释
There is an integer $T$ in the first line, indicating that there are $T$ test cases;

For the next $T$ lines, each line contains a positive integer $n (n<=1000000)$.
输出解释
For each test cases, output "Yes" if $n$ is a "$Yiding Number$", otherwise output "No".
输入样例
2
18
100
输出样例
Yes
No
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6937

最后修改于 2021-06-22T18:18:58+00:00 由爬虫自动更新

共提交 0

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