21722022-12-28 16:08:001478Oszthatóság 31-gyelcpp11Wrong answer 48/503ms4004 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())

void breaker(int n)
{
    n = n / 10 - 3 * (n % 10);
    while (n > 0)
    {
        cout << n << " ";
        n = n / 10 - 3 * (n % 10);
    }
}

int main()
{
   //ifstream cin("be.txt");
    int n;
    cin >> n;
    if (n % 31 == 0)
    {
        cout << "IGEN" << ln;
        breaker(n);
        cout << 0;
    }
    else
    {
        cout << "NEM" << ln;
        breaker(n);
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1876 KiB
2Accepted0/02ms2064 KiB
3Accepted3/32ms2272 KiB
4Accepted3/32ms2516 KiB
5Accepted4/42ms2720 KiB
6Accepted4/42ms2932 KiB
7Accepted4/42ms3024 KiB
8Accepted4/42ms3096 KiB
9Accepted4/42ms3184 KiB
10Accepted4/42ms3184 KiB
11Accepted4/42ms3440 KiB
12Accepted4/42ms3640 KiB
13Accepted4/42ms3672 KiB
14Accepted4/42ms3800 KiB
15Accepted2/22ms3872 KiB
16Wrong answer0/22ms4004 KiB