124552024-12-18 09:21:22feheristvanOszthatóság 31-gyelcpp17Accepted 50/501ms512 KiB
#include <iostream>
#include <vector>

using namespace std;

int main(){
    long long n;
    cin >> n;
    if(n % 31 == 0){
        cout << "IGEN \n";
    }
    else{
        cout << "NEM \n";
    }
    vector <int> a;
    int usz;
    while(n > 0){
        usz = n % 10 * 3;
        n /= 10;
        n = n - usz;
        if(n >= 0)
            a.push_back(n);
    }
    if(a.size() == 0)
        cout << "\n";
    for(auto i : a)
        cout << i << " ";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms512 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms320 KiB
5Accepted4/41ms320 KiB
6Accepted4/41ms508 KiB
7Accepted4/41ms320 KiB
8Accepted4/41ms508 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms320 KiB
11Accepted4/41ms376 KiB
12Accepted4/41ms320 KiB
13Accepted4/41ms500 KiB
14Accepted4/41ms392 KiB
15Accepted2/21ms320 KiB
16Accepted2/21ms320 KiB