7962022-01-16 12:03:36Halasz EszterOszthatóság 31-gyelcpp11Runtime error 0/5043ms60352 KiB
#include <iostream>
//#include <fstream>
#include <vector>

using namespace std;

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

vector<int>x;

int b,n,i;

int oszt(int n)
{
    int a;
    a=n%10;
    n=n/10;
    if(n-3*a>=0 && n!=0)
    {

        x.push_back(n-3*a);
        oszt(n-3*a);
    }
  //  return n;
}
int main()
{
    cin>>n;
    b=oszt(n);
    if(b%31==0)
    {
        cout<<"IGEN"<<"\n";
        for(auto e:x) cout<<e<<" ";
    }
    else
    {
        cout<<"NEM"<<"\n";
        for(auto e:x) cout<<e<<" ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Runtime error0/041ms60152 KiB
2Runtime error0/043ms60252 KiB
3Runtime error0/332ms60204 KiB
4Runtime error0/330ms60204 KiB
5Runtime error0/439ms60304 KiB
6Runtime error0/429ms60312 KiB
7Runtime error0/432ms60320 KiB
8Runtime error0/437ms60324 KiB
9Runtime error0/432ms60328 KiB
10Runtime error0/430ms60332 KiB
11Runtime error0/432ms60340 KiB
12Runtime error0/432ms60340 KiB
13Runtime error0/432ms60344 KiB
14Runtime error0/430ms60348 KiB
15Runtime error0/232ms60352 KiB
16Runtime error0/230ms60312 KiB