37552023-03-02 20:08:46Erik_GepardOszthatóság 31-gyelcpp17Wrong answer 48/503ms3592 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){
        string s=to_string(n);
        reverse(s.begin(), s.end());

        n=(n/10)-(3*(s[0]-'0'));
        if(n>=0) cout<<n<<" ";
    }
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1696 KiB
2Accepted0/03ms1860 KiB
3Accepted3/33ms2076 KiB
4Accepted3/32ms2284 KiB
5Accepted4/42ms2376 KiB
6Accepted4/43ms2596 KiB
7Accepted4/42ms2584 KiB
8Accepted4/42ms2588 KiB
9Accepted4/42ms2804 KiB
10Accepted4/43ms2924 KiB
11Accepted4/43ms3136 KiB
12Accepted4/42ms3364 KiB
13Accepted4/42ms3592 KiB
14Accepted4/42ms3548 KiB
15Accepted2/22ms3552 KiB
16Wrong answer0/22ms3556 KiB