76642024-01-10 11:12:01AblablablaOszthatóság 31-gyelcpp17Accepted 50/503ms3224 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;

    vector<int> szamok;

    while(n > 0){
        int akt = n % 10;
        n /= 10;
        n -= 3 * akt;
        szamok.push_back(n);
    }

    if(n == 0){
        cout << "IGEN\n";
    } else{
        cout << "NEM\n";
    }

    for(int x : szamok){
        if(x >= 0){
            cout << x << " ";
        }
    }
    cout << "\n";
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1812 KiB
2Accepted0/03ms2156 KiB
3Accepted3/33ms2184 KiB
4Accepted3/33ms2404 KiB
5Accepted4/43ms2616 KiB
6Accepted4/43ms2692 KiB
7Accepted4/43ms2764 KiB
8Accepted4/43ms3012 KiB
9Accepted4/42ms2976 KiB
10Accepted4/43ms3004 KiB
11Accepted4/43ms2976 KiB
12Accepted4/43ms3000 KiB
13Accepted4/42ms2984 KiB
14Accepted4/43ms3116 KiB
15Accepted2/23ms3224 KiB
16Accepted2/22ms3196 KiB