21862022-12-30 13:23:121478Oszthatóság 31-gyelcpp11Wrong answer 25/503ms3784 KiB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> p32;
typedef pair<ll, ll> p64;
typedef pair<double, double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int>> vv32;
typedef vector<vector<ll>> vv64;
typedef vector<vector<p64>> vvp64;
typedef vector<p64> vp64;
typedef vector<p32> vp32;
ll MOD = 998244353;
double eps = 1e-12;
#define forn(i, e) for (ll i = 0; i < e; i++)
#define forsn(i, s, e) for (ll i = s; i < e; i++)
#define rforn(i, s) for (ll i = s; i >= 0; i--)
#define rforsn(i, s, e) for (ll i = s; i >= e; i--)
#define ln "\n"
#define dbg(x) cout << #x << " = " << x << ln
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define INF 2e18
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())

int main()
{
    //ifstream cin("be.txt");
    int n;
    cin >> n;

    vector<int> answers;
    n = n / 10 - 3 * (n % 10);
    while (n >= 0)
    {
        answers.push_back(n);
        n = n / 10 - 3 * (n % 10);
        if (n == 0)
        {
            break;
        }
    }

    if (n % 31 == 0)
    {
        cout << "IGEN" << ln;
    }
    else
    {
        cout << "NEM" << ln;
    }

    for (int i = 0; i < answers.size(); i++)
    {
        cout << answers[i] << " ";
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base25/50
1Wrong answer0/03ms1812 KiB
2Accepted0/02ms2000 KiB
3Accepted3/32ms2080 KiB
4Wrong answer0/32ms2324 KiB
5Wrong answer0/42ms2400 KiB
6Accepted4/42ms2556 KiB
7Accepted4/42ms2696 KiB
8Wrong answer0/42ms3044 KiB
9Wrong answer0/42ms3252 KiB
10Accepted4/42ms3428 KiB
11Wrong answer0/42ms3536 KiB
12Accepted4/42ms3588 KiB
13Accepted4/42ms3596 KiB
14Wrong answer0/42ms3588 KiB
15Accepted2/22ms3660 KiB
16Wrong answer0/22ms3784 KiB