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

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

    ll n,k; cin >> n;k=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/01ms508 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms320 KiB
5Accepted4/41ms320 KiB
6Accepted4/41ms320 KiB
7Accepted4/41ms320 KiB
8Accepted4/41ms564 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms320 KiB
11Accepted4/41ms320 KiB
12Accepted4/41ms320 KiB
13Accepted4/41ms320 KiB
14Accepted4/41ms564 KiB
15Accepted2/21ms320 KiB
16Accepted2/21ms320 KiB