Given a positive integer n, determine if 1n is an infinite decimal in decimal base. If the answer is yes, print “Yes” in a single line, or print “No” if the answer is no.
The first line contains one positive integer T (1≤T≤100), denoting the number of test cases. For each test case: Input a single line containing a positive integer n (1≤n≤100).
Output T lines each contains a string “Yes” or “No”, denoting the answer to corresponding test case.
规律是:10的n次方(n>0)的质因子只有2和5。
因此, 最开始想到的思路是:看该数的质因子是否只有2和5
比赛结束后和同学交流:他们的解法是:定义一个大数,如1000000,看是否能整除n