51682023-04-20 17:23:38idkOszthatóság 31-gyelcpp11Wrong answer 48/503ms3572 KiB
#include <iostream>
#include<vector>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int eredmeny,kulonbseg=n,eleje,utolso;
    eredmeny=n;
    vector <int>a;
    do
    {
        eleje=kulonbseg/10;
        utolso=kulonbseg%10;
        kulonbseg=eleje-3*utolso;
        a.push_back(kulonbseg);
    }while(kulonbseg>0);


    if(kulonbseg==0)
    {
        cout<<"IGEN"<<endl;
        for(int i=0;i<a.size();i++)
        {
            cout<<a.at(i)<<" ";
        }
    }

    else
    {
        cout<<"NEM"<<endl;
        for(int i=0;i<a.size();i++)
        {
            if(a.at(i)>=0)
                cout<<a.at(i)<<" ";

        }
    }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1812 KiB
2Accepted0/03ms2056 KiB
3Accepted3/32ms2140 KiB
4Accepted3/32ms2140 KiB
5Accepted4/42ms2216 KiB
6Accepted4/43ms2428 KiB
7Accepted4/43ms2640 KiB
8Accepted4/43ms2852 KiB
9Accepted4/43ms3064 KiB
10Accepted4/43ms3280 KiB
11Accepted4/43ms3364 KiB
12Accepted4/43ms3492 KiB
13Accepted4/43ms3568 KiB
14Accepted4/42ms3572 KiB
15Accepted2/22ms3572 KiB
16Wrong answer0/23ms3568 KiB