59422023-10-06 07:56:12mmatedOszthatóság 31-gyelcpp17Wrong answer 33/503ms3792 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";
    if(n/10 -(n%10)*3<0)
    {
        cout<<"\n";
        return;
    }
    while(n>31)
    {
        n=n/10 - (n%10)*3;
        if(n>=0) cout<<n<<" ";
    }
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base33/50
1Accepted0/03ms1804 KiB
2Accepted0/03ms1928 KiB
3Accepted3/33ms2136 KiB
4Wrong answer0/33ms2352 KiB
5Accepted4/43ms2564 KiB
6Accepted4/42ms2644 KiB
7Accepted4/43ms2776 KiB
8Accepted4/42ms2860 KiB
9Wrong answer0/43ms2996 KiB
10Accepted4/43ms3224 KiB
11Wrong answer0/43ms3320 KiB
12Wrong answer0/43ms3524 KiB
13Accepted4/43ms3524 KiB
14Accepted4/43ms3740 KiB
15Wrong answer0/22ms3792 KiB
16Accepted2/22ms3792 KiB