21872022-12-30 13:27:391478Oszthatóság 31-gyelcpp11Wrong answer 48/503ms3608 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 % 31 == 0)
    {
        if (n == 0)
        {
            answers.push_back(n);
        }
        cout << "IGEN" << endl;
    }
    else
    {
        cout << "NEM" << endl;
    }

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

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1808 KiB
2Accepted0/02ms2148 KiB
3Accepted3/32ms2328 KiB
4Accepted3/32ms2460 KiB
5Accepted4/42ms2712 KiB
6Accepted4/42ms2912 KiB
7Accepted4/42ms2988 KiB
8Accepted4/42ms3056 KiB
9Accepted4/42ms3004 KiB
10Accepted4/42ms3040 KiB
11Accepted4/42ms3108 KiB
12Accepted4/42ms3200 KiB
13Accepted4/42ms3396 KiB
14Accepted4/42ms3484 KiB
15Accepted2/22ms3480 KiB
16Wrong answer0/22ms3608 KiB