17652022-12-02 20:36:48kdbOszthatóság 37-telcpp11Accepted 40/403ms3340 KiB
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
ostream& operator<<(ostream& os, vector<ll>& input)
{
    for (auto i : input) if (i >= 0) os << i << " ";
    os << endl;
    return os;
}
int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    ll n; cin >> n;
    vector<ll>vec;

    if (n % 37 == 0)
    {
        cout << "IGEN" << endl;
    }
    else cout << "NEM" << endl;
    while (n > 0)
    {
        int a = n % 10;
        n = (n - n % 10) / 10;
        n -= a * 11;
        vec.push_back(n);
    }
    cout << vec;
    return 0;
}
/*
32227

32222

111

38
*/
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/03ms1832 KiB
2Accepted0/02ms2056 KiB
3Accepted3/32ms2264 KiB
4Accepted3/32ms2340 KiB
5Accepted3/32ms2300 KiB
6Accepted3/32ms2428 KiB
7Accepted3/32ms2632 KiB
8Accepted3/32ms2872 KiB
9Accepted3/32ms2912 KiB
10Accepted3/32ms2912 KiB
11Accepted3/32ms2912 KiB
12Accepted3/32ms2912 KiB
13Accepted3/32ms2908 KiB
14Accepted3/32ms3044 KiB
15Accepted2/22ms3244 KiB
16Accepted2/22ms3340 KiB