38692023-03-03 12:40:55norbertvidaOszthatóság 31-gyelcpp17Wrong answer 46/503ms4120 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);
    if(szamok.size()) for(lli szam : szamok) cout << szam << " ";
    cout << "\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base46/50
1Accepted0/03ms1828 KiB
2Accepted0/03ms2204 KiB
3Accepted3/33ms2272 KiB
4Accepted3/33ms2448 KiB
5Accepted4/43ms2684 KiB
6Accepted4/43ms2772 KiB
7Accepted4/43ms2892 KiB
8Accepted4/43ms3104 KiB
9Accepted4/42ms3196 KiB
10Accepted4/42ms3296 KiB
11Accepted4/43ms3400 KiB
12Wrong answer0/42ms3612 KiB
13Accepted4/43ms3820 KiB
14Accepted4/43ms4040 KiB
15Accepted2/23ms4120 KiB
16Accepted2/22ms4004 KiB