Description
f(x)=5*x^13+13x^5+kax. 输入非负整数k, (k<10000) 找到最小的正整数a,使得对于任意整数x, 65|f(x) 若不存在这样的a,输出 "no" (无引号)
Input
有多组输入,每行一个k.
Output
每行输出一个a
Sample Input
9
Sample Output
63Source:
#include<iostream>
using namespace std;
int main()
...{
int k,a;
while(cin>>k)
...{
k%=65;
for(a=1;a<=65;++a)
...{
if(k*a%65==47)break;
}
if(a>65)cout<<"no"<<endl;
else cout<<a<<endl;
}
return 0;
}
![]()