#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int a[4] = { 0 }, t = 0, n, sum = 1, num = 1;
cin >> n;
while (sum <= n) {
if (t == 4) t = 0;
if (num % 7 == 0) a[t++]++;
else if (num % 10 == 7 || num / 10 % 10 == 7 || num / 100 == 7) a[t++]++;
else {
sum++; t++;
}
num++;
}
for (int i = 0; i < 4; i++)
cout << a[i] << endl;
}
CCF 201912-1 报数
最新推荐文章于 2022-01-06 10:06:36 发布