37562023-03-02 20:10:24Erik_GepardOszthatóság 31-gyelcpp17Accepted 50/503ms3760 KiB
#include <bits/stdc++.h>
using namespace std;

const int mod = 20210108;

void solve(){
    int n;
    cin>>n;
    if(n%31==0) cout<<"IGEN\n";
    else cout<<"NEM\n";
    while(n>0){
        n=(n/10)-(3*(n%10));
        if(n>=0) cout<<n<<" ";
    }
    cout<<"\n";
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1888 KiB
2Accepted0/03ms2096 KiB
3Accepted3/33ms2320 KiB
4Accepted3/33ms2536 KiB
5Accepted4/43ms2740 KiB
6Accepted4/43ms2960 KiB
7Accepted4/42ms3052 KiB
8Accepted4/42ms3028 KiB
9Accepted4/43ms3152 KiB
10Accepted4/42ms3236 KiB
11Accepted4/43ms3376 KiB
12Accepted4/43ms3600 KiB
13Accepted4/42ms3660 KiB
14Accepted4/43ms3664 KiB
15Accepted2/22ms3668 KiB
16Accepted2/22ms3760 KiB