20902022-12-19 08:35:13szabel26Oszthatóság 31-gyelcpp17Wrong answer 48/503ms4320 KiB
#include <iostream>
#include <vector>

using namespace std;

long long n,k;

vector<long long>sz;

int main()
{
    cin>>n;
    if(n>=31)
    {
        while(n>0)
        {
            k=n%10;
            n/=10;
            n-=3*k;
            if(n>=0) sz.push_back(n);
        }

        if(!n%31) cout<<"IGEN"<<"\n";
            else cout<<"NEM"<<"\n";
        for(auto &e:sz) cout<<e<<" ";
    }
    else cout<<"NEM"<<"\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1876 KiB
2Accepted0/02ms2124 KiB
3Accepted3/32ms2268 KiB
4Accepted3/32ms2480 KiB
5Accepted4/42ms2716 KiB
6Accepted4/42ms2920 KiB
7Accepted4/42ms2996 KiB
8Accepted4/42ms3092 KiB
9Accepted4/42ms3436 KiB
10Accepted4/42ms3472 KiB
11Accepted4/42ms3600 KiB
12Accepted4/42ms3804 KiB
13Accepted4/42ms4012 KiB
14Accepted4/42ms4208 KiB
15Accepted2/22ms4284 KiB
16Wrong answer0/22ms4320 KiB