|
- #include<iostream>
- using namespace std;
- int i,k,s;
- int a,b,c,j;
- int main()
- {
- cin>>k;
- for(i=10000;i<=30000;i++)
- {j=i;
- a=j/100;
- b=j%10000/10;
- c=j%1000;
- if((a%k==0)&&(b%k==0)&&(c%k==0))
- {
- cout<<j<<endl;
- s++;}
- }
- cout<<s;
- if(s==0)
- cout<<"No";
- return 0;
- }
复制代码 |
|