17672022-12-02 20:49:40kdbOszthatóság 31-gyelcpp11Accepted 50/503ms3900 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 % 31 == 0)
    {
        cout << "IGEN" << endl;
    }
    else cout << "NEM" << endl;
    while (n > 0)
    {
        int a = n % 10;
        n = (n - n % 10) / 10;
        n -= a * 3;
        vec.push_back(n);
    }
    cout << vec;
    return 0;
}
/*
204197

204196

62

63
*/
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1704 KiB
2Accepted0/02ms1860 KiB
3Accepted3/32ms2064 KiB
4Accepted3/32ms2296 KiB
5Accepted4/42ms2376 KiB
6Accepted4/42ms2500 KiB
7Accepted4/42ms2732 KiB
8Accepted4/42ms2880 KiB
9Accepted4/42ms3112 KiB
10Accepted4/42ms3164 KiB
11Accepted4/42ms3440 KiB
12Accepted4/42ms3412 KiB
13Accepted4/42ms3640 KiB
14Accepted4/42ms3740 KiB
15Accepted2/22ms3896 KiB
16Accepted2/22ms3900 KiB