51722023-04-20 17:25:40BalintGezaOszthatóság 31-gyelcpp14Accepted 50/503ms3672 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int szam;
    cin>>szam;
    int  kulombseg=szam, eleje, utolso, i;
    vector<int> a;

    do
    {
        eleje=kulombseg/10;
        utolso=kulombseg%10;
        kulombseg=eleje-3*utolso;
        a.push_back(kulombseg);

    }while(kulombseg>0);

    if(kulombseg==0)
    {
        cout<<"IGEN"<<endl;
        for(i=0;i<a.size();i++)
            cout<<a.at(i)<<" ";
    }
    else
    {
        cout<<"NEM"<<endl;
        for(i=0;i<a.size();i++)
        {
            if(a.at(i)>0)
                cout<<a.at(i)<<" ";
        }
        cout<<endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1812 KiB
2Accepted0/03ms2060 KiB
3Accepted3/32ms2268 KiB
4Accepted3/33ms2484 KiB
5Accepted4/42ms2544 KiB
6Accepted4/42ms2608 KiB
7Accepted4/43ms2756 KiB
8Accepted4/43ms2896 KiB
9Accepted4/43ms3044 KiB
10Accepted4/43ms3256 KiB
11Accepted4/42ms3268 KiB
12Accepted4/42ms3264 KiB
13Accepted4/43ms3376 KiB
14Accepted4/43ms3580 KiB
15Accepted2/22ms3672 KiB
16Accepted2/23ms3672 KiB