124002024-12-16 15:43:07mártonágnesOszthatóság 31-gyelcpp17Wrong answer 48/501ms508 KiB
#include <iostream>

using namespace std;

int main()
{
    int N, kivon=0, uj=0, x, h=1;
    cin >> N;
    int resz[1000];
    while (N>0)
    {

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

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/01ms320 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms320 KiB
5Accepted4/41ms320 KiB
6Accepted4/41ms320 KiB
7Accepted4/41ms320 KiB
8Accepted4/41ms320 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms320 KiB
11Accepted4/41ms320 KiB
12Accepted4/41ms320 KiB
13Accepted4/41ms320 KiB
14Accepted4/41ms508 KiB
15Accepted2/21ms320 KiB
16Wrong answer0/21ms508 KiB