16492022-12-01 12:02:01bzsofiaOszthatóság 31-gyelcpp11Accepted 50/503ms3532 KiB
#include <iostream>

using namespace std;

long long a, o;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin>>a;

    if (a%31==0) cout<<"IGEN";
    else cout<<"NEM";

    cout<<"\n";

    while (a>0)
    {
        a=a/10-(a%10)*3;
        if (a>=0) cout<<a<<" ";
    }

    cout<<"\n";

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1764 KiB
2Accepted0/02ms1992 KiB
3Accepted3/32ms2132 KiB
4Accepted3/32ms2208 KiB
5Accepted4/42ms2432 KiB
6Accepted4/42ms2668 KiB
7Accepted4/42ms2872 KiB
8Accepted4/42ms3076 KiB
9Accepted4/42ms3284 KiB
10Accepted4/42ms3484 KiB
11Accepted4/42ms3488 KiB
12Accepted4/42ms3432 KiB
13Accepted4/42ms3432 KiB
14Accepted4/42ms3532 KiB
15Accepted2/22ms3432 KiB
16Accepted2/22ms3428 KiB