#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <iterator>
#include <string>
#define ll long long
using namespace std;
ll n, call_number = 1, people_num = 0;
vector<int>people(4);
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
for (size_t i = 0; i < n; i++)
{
if ((call_number % 7 == 0) || to_string(call_number).find('7') != -1)
people[people_num]++, i--;
call_number++;
people_num = (people_num + 1) % 4;
}
for (size_t i = 0; i < 4; i++)
{
cout << people[i] << endl;
}
return 0;
}
【算法练习】CSP--201912-1--报数
最新推荐文章于 2024-09-26 00:03:11 发布