120732024-11-29 07:54:25mártonágnesOszthatóság 31-gyelcpp17Time limit exceeded 0/50280ms512 KiB
#include <iostream>

using namespace std;

int main()
{
    int N, kivon=0, uj=0, x, h, resz[N], i=1;
    cin >> N;
    while (N>=0)
    {
        kivon=N%10*3;
        x=N/10;
        h=1;
        while (x>1)
        {
            uj=uj+x%10*h;
            h=h*10;
        }
        N=uj-kivon;
        resz[i]=N;
        i++;
    }
    if (N==0)
    {
        cout << "IGEN" << endl;
        for (int i=1; i<=N && resz[i]!=0; i++)
        {
            cout << resz[i] << " ";
        }
    }
    else cout << "NEM" << endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Time limit exceeded0/0279ms320 KiB
2Time limit exceeded0/0280ms320 KiB
3Time limit exceeded0/3280ms320 KiB
4Time limit exceeded0/3280ms320 KiB
5Time limit exceeded0/4277ms320 KiB
6Time limit exceeded0/4277ms508 KiB
7Time limit exceeded0/4280ms320 KiB
8Time limit exceeded0/4279ms512 KiB
9Time limit exceeded0/4277ms512 KiB
10Time limit exceeded0/4280ms320 KiB
11Time limit exceeded0/4280ms508 KiB
12Time limit exceeded0/4280ms320 KiB
13Time limit exceeded0/4273ms320 KiB
14Time limit exceeded0/4277ms320 KiB
15Time limit exceeded0/2279ms508 KiB
16Time limit exceeded0/2277ms320 KiB