原题
###运行结果
代码
#include <iostream>
using namespace std;
int judge(int x){
if( x%7 == 0)
return 1;
else{
int t=x;
while (t){
if(t%10 ==7)
return 1;
t/=10;
}
return 0;
}
}
int main(){
int n;
while (cin>>n){
//初始化
int sum=0, jump = 0;
int res[4] ={0};
//循环
for(int i=1; sum<=n; i++){
if(judge(i)){
jump++;
res[(sum+jump)%4]++;
}else
sum++;
}
//输出
cout<<res[1]<<endl<<res[2]<<endl<<res[3]<<endl<<res[0]<<endl;
}
return 0;
//不太明白问题出在哪里,求大佬们看看
}