104672024-04-03 07:31:01VargusOszthatóság 31-gyelcpp17Wrong answer 48/503ms4336 KiB
#include <iostream>
#include <queue>
#define ll long long

using namespace std;

vector <ll> x;

void f(ll n)
{
    n = ((n / 10) - (3 * (n % 10)));
    x.push_back(n);
    if (n == 0)
    {
        cout << "IGEN\n";
        return;
    }
    if (n < 0)
    {
        cout << "NEM\n";
        x.pop_back();
        return;
    }
    f(n);
}

int main()
{
    ll n;
    cin >> n;
    f(n);
    for (auto& e : x)
        cout << e << " ";

    return 0;
}
/*
204197

204196

62

63
*/
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1876 KiB
2Accepted0/03ms2196 KiB
3Accepted3/33ms2372 KiB
4Accepted3/33ms2460 KiB
5Accepted4/43ms2980 KiB
6Accepted4/43ms2936 KiB
7Accepted4/42ms3016 KiB
8Accepted4/43ms3152 KiB
9Accepted4/43ms3252 KiB
10Accepted4/42ms3268 KiB
11Accepted4/43ms3400 KiB
12Accepted4/43ms3492 KiB
13Accepted4/43ms3884 KiB
14Accepted4/43ms3892 KiB
15Accepted2/23ms3972 KiB
16Wrong answer0/23ms4336 KiB