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

建议使用的浏览器:

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

4320:Arcane Numbers 1

题目描述
Vance and Shackler like playing games. One day, they are playing a game called "arcane numbers". The game is pretty simple, Vance writes down a finite decimal under base A, and then Shackler translates it under base B. If Shackler can translate it into a finite decimal, he wins, else it will be Vance’s win. Now given A and B, please help Vance to determine whether he will win or not. Note that they are playing this game using a mystery language so that A and B may be up to 10^12.
输入解释
The first line contains a single integer T, the number of test cases.
For each case, there’s a single line contains A and B.
输出解释
For each case, output “NO” if Vance will win the game. Otherwise, print “YES”. See Sample Output for more details.
输入样例
3
5 5
2 3
1000 2000
输出样例
Case #1: YES
Case #2: NO
Case #3: YES
来自杭电HDUOJ的附加信息
Author BJTU
Recommend zhoujiaqi2010

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

源链接: HDU-4320

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

共提交 0

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