17572022-12-02 19:51:53levente19Oszthatóság 37-telcpp11Wrong answer 38/403ms4132 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 = floor(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/03ms1824 KiB
2Accepted0/02ms2056 KiB
3Accepted3/32ms2220 KiB
4Accepted3/32ms2428 KiB
5Accepted3/32ms2648 KiB
6Accepted3/32ms2708 KiB
7Accepted3/32ms2832 KiB
8Accepted3/32ms3060 KiB
9Accepted3/32ms3264 KiB
10Accepted3/32ms3352 KiB
11Accepted3/32ms3548 KiB
12Accepted3/32ms3776 KiB
13Accepted3/32ms3904 KiB
14Accepted3/32ms4132 KiB
15Wrong answer0/22ms4076 KiB
16Accepted2/22ms4076 KiB