51642023-04-20 17:20:19idkOszthatóság 31-gyelcpp11Wrong answer 48/503ms3784 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/03ms1808 KiB
2Accepted0/03ms2004 KiB
3Accepted3/33ms2224 KiB
4Accepted3/33ms2460 KiB
5Accepted4/42ms2540 KiB
6Accepted4/43ms2540 KiB
7Accepted4/43ms2752 KiB
8Accepted4/43ms2948 KiB
9Accepted4/43ms3204 KiB
10Accepted4/42ms3252 KiB
11Accepted4/43ms3276 KiB
12Accepted4/43ms3376 KiB
13Accepted4/43ms3596 KiB
14Accepted4/42ms3676 KiB
15Accepted2/22ms3784 KiB
16Wrong answer0/22ms3672 KiB