38712023-03-03 12:43:18norbertvidaOszthatóság 31-gyelcpp17Wrong answer 3/503ms3724 KiB
#include <iostream>
#include <vector>
#define lli long long int

using namespace std;

int main() {
    iostream::sync_with_stdio(0);
    cin.tie(0);
    lli N;
    cin >> N;
    cout << (N % 31 ? "NEM\n" : "IGEN\n"); 
    vector<lli> szamok;
    do {
        N = (N / 10) - (N % 10) * 3;
        szamok.push_back(N);
        if(N < 31) break;
    } while(N >= 31);
    for(lli szam : szamok) cout << szam << " ";
    if(N == 0) cout << "0";
    cout << "\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/50
1Wrong answer0/03ms1824 KiB
2Accepted0/02ms2060 KiB
3Accepted3/33ms2288 KiB
4Wrong answer0/33ms2376 KiB
5Wrong answer0/43ms2500 KiB
6Wrong answer0/43ms2708 KiB
7Wrong answer0/43ms2796 KiB
8Wrong answer0/43ms2912 KiB
9Wrong answer0/42ms3120 KiB
10Wrong answer0/42ms3220 KiB
11Wrong answer0/42ms3200 KiB
12Wrong answer0/42ms3204 KiB
13Wrong answer0/42ms3304 KiB
14Wrong answer0/42ms3388 KiB
15Wrong answer0/23ms3520 KiB
16Wrong answer0/23ms3724 KiB