218582026-01-14 09:30:29TakacsAndrasOszthatóság 31-gyelcpp17Accepted 50/501ms552 KiB
#include <bits/stdc++.h>
using namespace std;
int main() {
    int n; cin >> n;
    if (n % 31 == 0) cout << "IGEN\n";
    else cout << "NEM\n";
    while (n > 0) {
        n = n/10-3*(n%10);
        if (n >= 0) cout << n << ' ';
    }
    cout << '\n';
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms512 KiB
2Accepted0/01ms316 KiB
3Accepted3/31ms316 KiB
4Accepted3/31ms316 KiB
5Accepted4/41ms316 KiB
6Accepted4/41ms316 KiB
7Accepted4/41ms316 KiB
8Accepted4/41ms316 KiB
9Accepted4/41ms316 KiB
10Accepted4/41ms552 KiB
11Accepted4/41ms316 KiB
12Accepted4/41ms316 KiB
13Accepted4/41ms316 KiB
14Accepted4/41ms316 KiB
15Accepted2/21ms508 KiB
16Accepted2/21ms508 KiB