51652023-04-20 17:21:34BalintGezaOszthatóság 31-gyelcpp14Wrong answer 48/503ms3772 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int szam;
    cin>>szam;
    int  kulombseg=szam, eleje=0, utolso=0, 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)<<" ";
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1816 KiB
2Accepted0/02ms2056 KiB
3Accepted3/33ms2252 KiB
4Accepted3/33ms2460 KiB
5Accepted4/42ms2580 KiB
6Accepted4/42ms2648 KiB
7Accepted4/43ms2892 KiB
8Accepted4/42ms2976 KiB
9Accepted4/42ms2824 KiB
10Accepted4/42ms2952 KiB
11Accepted4/43ms3200 KiB
12Accepted4/43ms3432 KiB
13Accepted4/43ms3660 KiB
14Accepted4/42ms3740 KiB
15Accepted2/22ms3668 KiB
16Wrong answer0/22ms3772 KiB