38672023-03-03 12:39:55norbertvidaOszthatóság 31-gyelcpp17Wrong answer 46/503ms4060 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;
        if(N < 0)  break;
        szamok.push_back(N);
        if(N < 31) break;
    } while(N >= 31);
    for(lli szam : szamok) cout << szam << " ";
    cout << "\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base46/50
1Accepted0/03ms1696 KiB
2Accepted0/03ms1864 KiB
3Accepted3/33ms2080 KiB
4Accepted3/33ms2300 KiB
5Accepted4/42ms2660 KiB
6Accepted4/42ms2776 KiB
7Accepted4/43ms3016 KiB
8Accepted4/43ms3236 KiB
9Accepted4/43ms3380 KiB
10Accepted4/42ms3600 KiB
11Accepted4/42ms3468 KiB
12Wrong answer0/42ms3664 KiB
13Accepted4/42ms3660 KiB
14Accepted4/43ms3764 KiB
15Accepted2/23ms3992 KiB
16Accepted2/22ms4060 KiB