59432023-10-06 08:25:09mmatedOszthatóság 31-gyelcpp17Accepted 50/503ms4288 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n;
    cin>>n;
    if(n%31==0) cout<<"IGEN\n";
    else    cout<<"NEM\n";
    while(n>0)
    {
        n=n/10 - (n%10)*3;
        if(n>=0)    cout<<n<<" ";
    }
    cout<<"\n";
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1892 KiB
2Accepted0/03ms2120 KiB
3Accepted3/32ms2328 KiB
4Accepted3/33ms2528 KiB
5Accepted4/43ms2740 KiB
6Accepted4/43ms2956 KiB
7Accepted4/43ms3172 KiB
8Accepted4/43ms3372 KiB
9Accepted4/42ms3460 KiB
10Accepted4/43ms3608 KiB
11Accepted4/42ms3536 KiB
12Accepted4/43ms3656 KiB
13Accepted4/42ms3876 KiB
14Accepted4/43ms3992 KiB
15Accepted2/22ms4064 KiB
16Accepted2/23ms4288 KiB