17642022-12-02 20:17:10kdbOszthatóság 17-tel (60 pont)cpp11Accepted 60/603ms3576 KiB
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
ostream& operator<<(ostream& os, vector<ll>& input)
{
    for (auto i : input) if (i>=0) os << i << " ";
    os << endl;
    return os;
}
int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    ll n; cin >> n;
    vector<ll>vec;

    if (n % 17 == 0)
    {
        cout << "IGEN" << endl;
    }
    else cout << "NEM" << endl;
    while (n > 0)
    {
        int a = n % 10;
        n = (n - n % 10) / 10;
        n -= a * 5;
        vec.push_back(n);
    }
    cout << vec;
    return 0;
}
/*
132770

132771

51

27
*/
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1824 KiB
2Accepted0/02ms2060 KiB
3Accepted3/32ms2228 KiB
4Accepted3/32ms2296 KiB
5Accepted4/42ms2464 KiB
6Accepted4/42ms2620 KiB
7Accepted4/42ms2784 KiB
8Accepted5/52ms2864 KiB
9Accepted5/52ms2988 KiB
10Accepted5/52ms3064 KiB
11Accepted5/52ms3196 KiB
12Accepted6/62ms3396 KiB
13Accepted6/62ms3472 KiB
14Accepted6/62ms3476 KiB
15Accepted2/22ms3468 KiB
16Accepted2/22ms3576 KiB