17562022-12-02 19:45:19levente19Oszthatóság 17-tel (60 pont)cpp11Wrong answer 58/603ms3412 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*5;
        if(n >= 0) kozb.push_back(n);
        else break;
    }

    if(kozb.size() != 0) {
        if(kozb.back() % 17 == 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
base58/60
1Accepted0/03ms1824 KiB
2Accepted0/02ms2020 KiB
3Accepted3/32ms2092 KiB
4Accepted3/32ms2220 KiB
5Accepted4/42ms2432 KiB
6Accepted4/42ms2648 KiB
7Accepted4/42ms2752 KiB
8Accepted5/52ms2604 KiB
9Accepted5/52ms2600 KiB
10Accepted5/52ms2732 KiB
11Accepted5/52ms2808 KiB
12Accepted6/62ms2960 KiB
13Accepted6/62ms3008 KiB
14Accepted6/62ms3212 KiB
15Accepted2/22ms3312 KiB
16Wrong answer0/22ms3412 KiB