38602023-03-03 12:26:46norbertvidaOszthatóság 31-gyelcpp17Wrong answer 28/503ms3944 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);
    for(lli szam : szamok) cout << szam << " ";
    cout << "\n";
}
SubtaskSumTestVerdictTimeMemory
base28/50
1Accepted0/03ms1952 KiB
2Accepted0/03ms2244 KiB
3Accepted3/33ms2192 KiB
4Accepted3/33ms2396 KiB
5Accepted4/43ms2768 KiB
6Wrong answer0/43ms2804 KiB
7Wrong answer0/42ms3024 KiB
8Accepted4/42ms3168 KiB
9Accepted4/43ms3380 KiB
10Wrong answer0/42ms3464 KiB
11Accepted4/43ms3532 KiB
12Wrong answer0/43ms3676 KiB
13Wrong answer0/42ms3716 KiB
14Accepted4/42ms3732 KiB
15Accepted2/22ms3732 KiB
16Wrong answer0/23ms3944 KiB