28842023-02-01 18:34:57UnluckYOszthatóság 31-gyelcpp11Accepted 50/503ms4224 KiB
#include <bits/stdc++.h>

using namespace std;

int main(){

    int n; cin >> n;
    vector<int> v;

    while (true){
        n = n / 10 - (3 * (n%10));
        if (n < 0){cout << "NEM"; break;}
        v.push_back(n);
        if(n == 0){cout << "IGEN"; break;}
    }

    cout << endl;

    for (int i : v){
        cout << i << " ";
    }

    if (v.size() == 0) cout << endl;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1960 KiB
2Accepted0/03ms2108 KiB
3Accepted3/33ms2272 KiB
4Accepted3/33ms2388 KiB
5Accepted4/43ms2632 KiB
6Accepted4/42ms2680 KiB
7Accepted4/43ms2836 KiB
8Accepted4/43ms2968 KiB
9Accepted4/42ms3056 KiB
10Accepted4/43ms3272 KiB
11Accepted4/43ms3480 KiB
12Accepted4/42ms3588 KiB
13Accepted4/43ms3724 KiB
14Accepted4/43ms3960 KiB
15Accepted2/23ms4140 KiB
16Accepted2/22ms4224 KiB