15242022-11-22 00:20:12TomaSajtOszthatóság 31-gyelcpp14Accepted 50/503ms3492 KiB
#include <bits/stdc++.h>
#define speed ios::sync_with_stdio(0);cin.tie(0)
using namespace std;

int main() {
    speed;
    int n; cin >> n;
    cout << (n % 31 == 0 ? "IGEN" : "NEM") << '\n';
    while (n > 0) {
        n = n / 10 - 3 * (n % 10);
        if (n >= 0) cout << n << ' ';
    }
    cout << '\n';
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1888 KiB
2Accepted0/02ms2084 KiB
3Accepted3/32ms2312 KiB
4Accepted3/32ms2488 KiB
5Accepted4/42ms2712 KiB
6Accepted4/42ms2600 KiB
7Accepted4/42ms2728 KiB
8Accepted4/42ms2800 KiB
9Accepted4/42ms2800 KiB
10Accepted4/42ms2800 KiB
11Accepted4/42ms2868 KiB
12Accepted4/42ms3144 KiB
13Accepted4/42ms3208 KiB
14Accepted4/42ms3288 KiB
15Accepted2/22ms3416 KiB
16Accepted2/22ms3492 KiB