#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int i,n,sum=9;
scanf("%d",&n);
for(i=1;i<10;i++){
if(sum%n==0){
break;
}else{
sum=sum*10+9;
}
}
printf("%d %d ",sum,i);
return 0;
}
判断一个素数能被几个9整除(由9组成的几位数)
最新推荐文章于 2024-07-13 13:36:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)