#include<stdio.h> int main(){ int n; scanf("%d",&n); int number=0;//数字 int count=0;//计数 int player[5] = {0,0,0,0,0}; while(n>count) { number++; if(number%7=0||number%10==7||(number/10)%10==7) { if(number%4==1) { player[1]+=1; } else if(number%4==2) { player[2]+=1; } else if(number%4==3) { player[3]+=1; } else if(number%4==0) { player[4]+=1; } } else count++; } for(int i=1;i<=4;i++) { printf("%d\n",player[i]); } return 0; }
CCF认证题--报数,在VC上编译没有任何问题,到了CCF上就不行了?
最新推荐文章于 2021-09-06 20:40:15 发布