17582022-12-02 19:53:51levente19Oszthatóság 37-telcpp11Wrong answer 38/403ms3636 KiB
#include <bits/stdc++.h>
#define gyorsan ios::sync_with_stdio(0);cin.tie(0)

using namespace std;

int main()
{
    gyorsan;

    vector<long long> kozb;
    long long n;

    cin >> n;

    while(n > 0) {
        int lastDigit = n % 10;
        n = n / 10 - lastDigit*11;
        if(n >= 0) kozb.push_back(n);
        else break;
    }

    if(kozb.size() != 0) {
        if(kozb.back() % 37 == 0) {
            cout << "IGEN" << endl;
            for(long long l : kozb) {
                cout << l << " ";
            }
        }

        else {
            cout << "NEM" << endl;
            for(long long l : kozb) {
                cout << l << " ";
            }
        }
    }

    else {
        cout << "NEM" << endl;
        cout << endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base38/40
1Accepted0/03ms1828 KiB
2Accepted0/02ms2048 KiB
3Accepted3/32ms2280 KiB
4Accepted3/32ms2488 KiB
5Accepted3/32ms2556 KiB
6Accepted3/32ms2756 KiB
7Accepted3/32ms2992 KiB
8Accepted3/32ms3208 KiB
9Accepted3/32ms3128 KiB
10Accepted3/32ms3124 KiB
11Accepted3/32ms3096 KiB
12Accepted3/32ms3100 KiB
13Accepted3/32ms3224 KiB
14Accepted3/32ms3432 KiB
15Wrong answer0/22ms3508 KiB
16Accepted2/22ms3636 KiB