125152024-12-21 10:35:30CsongiOszthatóság 31-gyelcpp17Accepted 50/501ms552 KiB
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    ll n; cin >> n;
    int l;
    n % 31 == 0 ? cout << "IGEN"<<endl : cout << "NEM"<<endl;
    while (n > 0)
    {
        l = (n % 10)*3;
        n /= 10;
        n = n - l;
        if (n >=0) cout << n << " ";
    }
    cout << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms320 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms508 KiB
4Accepted3/31ms324 KiB
5Accepted4/41ms320 KiB
6Accepted4/41ms320 KiB
7Accepted4/41ms320 KiB
8Accepted4/41ms320 KiB
9Accepted4/41ms552 KiB
10Accepted4/41ms320 KiB
11Accepted4/41ms508 KiB
12Accepted4/41ms524 KiB
13Accepted4/41ms320 KiB
14Accepted4/41ms320 KiB
15Accepted2/21ms320 KiB
16Accepted2/21ms320 KiB