7352022-01-01 11:18:18kismartongOszthatóság 31-gyelcpp14Accepted 50/503ms2120 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	long long int n;
	cin >> n;
	vector<long long int> szamok;
	long long int sz = n;
	while (true) {
		sz = (sz/10) - (3*(sz%10));
		if (sz < 0) {
			cout << "NEM" << '\n';
			break;
		}
		szamok.push_back(sz);
		if (sz == 0) {
			cout << "IGEN" << '\n';
			break;
		}
	}
	for (int i = 0; i < szamok.size(); i++) {
		cout << szamok[i] << " ";
	}
	cout << '\n';
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms2044 KiB
2Accepted0/01ms2016 KiB
3Accepted3/31ms2052 KiB
4Accepted3/31ms2060 KiB
5Accepted4/42ms2064 KiB
6Accepted4/42ms2076 KiB
7Accepted4/41ms2080 KiB
8Accepted4/41ms2084 KiB
9Accepted4/41ms2096 KiB
10Accepted4/41ms2100 KiB
11Accepted4/41ms2096 KiB
12Accepted4/41ms2088 KiB
13Accepted4/41ms2092 KiB
14Accepted4/41ms2116 KiB
15Accepted2/21ms2120 KiB
16Accepted2/21ms2116 KiB