8552022-01-20 22:10:04Halasz EszterOszthatóság 31-gyelcpp11Wrong answer 48/502ms1892 KiB
#include <iostream>
//#include <fstream>
#include <vector>

using namespace std;

//ifstream cin("31el.in");
//ofstream cout("31el.out");

vector<long long>x;

long long b,n,i;

void oszt(long long n)
{
    int a;
    a=n%10;
    n=n/10;
    n=n-3*a;
    if(n>=0)
    {
        b=n;
        x.push_back(n);
        if(n!=0) oszt(n);
    }
}
int main()
{
    cin>>n;
    oszt(n);
    if(b==0 && x.size()!=0)
    {
        cout<<"IGEN"<<"\n";
        for(auto e:x) cout<<e<<" ";
    }
    else
    {
        cout<<"NEM"<<"\n";
        for(auto e:x) cout<<e<<" ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/02ms1808 KiB
2Accepted0/01ms1832 KiB
3Accepted3/31ms1888 KiB
4Accepted3/31ms1784 KiB
5Accepted4/41ms1784 KiB
6Accepted4/41ms1784 KiB
7Accepted4/41ms1784 KiB
8Accepted4/41ms1888 KiB
9Accepted4/41ms1788 KiB
10Accepted4/41ms1892 KiB
11Accepted4/41ms1784 KiB
12Accepted4/41ms1884 KiB
13Accepted4/41ms1888 KiB
14Accepted4/41ms1892 KiB
15Accepted2/21ms1784 KiB
16Wrong answer0/21ms1784 KiB