77992024-01-11 10:27:18tamasmarkOszthatóság 31-gyelcpp17Accepted 50/503ms3832 KiB
#include <iostream>
//#include <fstream>

using namespace std;

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

int a,r,k;

int main()
{
    cin>>a;
    k=a;
    while(k>=3*r)
    {
        r=k%10;
        k=k/10;
        k=k-(3*r);
    }

    if(k%31==0) cout<<"IGEN"<<"\n";
        else cout<<"NEM"<<"\n";

    while(a>0)
    {
        r=a%10;
        a=a/10;
        if(a>=(3*r))
        {
            a=a-(3*r);
            cout<<a<<" ";
        }
        else cout<<"\n";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1744 KiB
2Accepted0/03ms1916 KiB
3Accepted3/33ms2120 KiB
4Accepted3/33ms2336 KiB
5Accepted4/43ms2544 KiB
6Accepted4/43ms2912 KiB
7Accepted4/43ms2848 KiB
8Accepted4/43ms3060 KiB
9Accepted4/43ms3112 KiB
10Accepted4/43ms3476 KiB
11Accepted4/43ms3528 KiB
12Accepted4/43ms3772 KiB
13Accepted4/43ms3820 KiB
14Accepted4/43ms3824 KiB
15Accepted2/23ms3824 KiB
16Accepted2/23ms3832 KiB