7072021-11-18 17:40:30Kevinke12Oszthatóság 37-telcpp14Accepted 40/402ms2080 KiB
#include <iostream>
#include <bits/stdc++.h>
using namespace std;

long long N;
vector<long long> t;

int main()
{
    cin >> N;
    t.push_back(N);
    while(N>0)
    {

        long long k=N%10*11;
        N/=10;
        N-=k;
        t.push_back(N);
        //cout << N << "\n";

    }
    if(t[t.size()-1]<0) t.pop_back();
    if(t[t.size()-1]%37==0)
    {
        cout << "IGEN\n";
        for(int i = 1; i < t.size(); i++)
            cout << t[i] << " "; cout << "\n";
    }
    else
    {
        cout << "NEM\n";
        for(int i = 1; i < t.size(); i++)
            cout << t[i] << " "; cout << "\n";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/02ms1892 KiB
2Accepted0/01ms2020 KiB
3Accepted3/31ms2032 KiB
4Accepted3/31ms2028 KiB
5Accepted3/31ms2040 KiB
6Accepted3/31ms2044 KiB
7Accepted3/31ms2048 KiB
8Accepted3/31ms2044 KiB
9Accepted3/31ms2060 KiB
10Accepted3/31ms2052 KiB
11Accepted3/31ms2056 KiB
12Accepted3/31ms2060 KiB
13Accepted3/31ms2056 KiB
14Accepted3/31ms2068 KiB
15Accepted2/21ms2080 KiB
16Accepted2/21ms2076 KiB