报数
#include <iostream>
using namespace std;
int main() {
int n,count,number=0,sign=1;
int p[4]={0};
cin>>n;
for(count=0;count<n;){
number++;
switch(sign){
case 1:
if(number%7==0 ||number%10==7||number/100==7||number%100/10==7){
p[0]++;
} else{
count++;
}
sign=2;
break;
case 2:
if(number%7==0 ||number%10==7||number/100==7||number%100/10==7){
p[1]++;
} else{
count++;
}
sign=3;
break;
case 3:
if(number%7==0 ||number%10==7||number/100==7||number%100/10==7){
p[2]++;
} else{
count++;
}
sign=4;
break;
case 4:
if(number%7==0 ||number%10==7||number/100==7||number%100/10==7){
p[3]++;
} else{
count++;
}
sign=1;
break;
}
}
cout<<p[0]<<"\n"<<p[1]<<"\n"<<p[2]<<"\n"<<p[3]<<endl;
return 0;
}