59412023-10-06 07:45:23mmatedOszthatóság 31-gyelcpp17Wrong answer 31/503ms4300 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>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
base31/50
1Accepted0/03ms1888 KiB
2Accepted0/02ms2124 KiB
3Accepted3/33ms2336 KiB
4Wrong answer0/33ms2560 KiB
5Accepted4/42ms2740 KiB
6Accepted4/43ms2836 KiB
7Accepted4/42ms2920 KiB
8Accepted4/43ms3132 KiB
9Wrong answer0/43ms3340 KiB
10Accepted4/42ms3328 KiB
11Wrong answer0/42ms3552 KiB
12Wrong answer0/42ms3636 KiB
13Accepted4/43ms3772 KiB
14Accepted4/43ms3980 KiB
15Wrong answer0/23ms4212 KiB
16Wrong answer0/22ms4300 KiB