67302023-12-18 11:53:33madvirOszthatóság 31-gyelcpp17Wrong answer 48/503ms3804 KiB
#include <iostream>
#include <set>
#include <iterator>

using namespace std;

int main()
{
    int n, db=0, szj=0;
    cin >> n;

    int x=n;
    while(x>0) {
        x=x/10;
        szj++;
    }
    int k[szj], y=0;

    n=n/10-3*(n%10);
    while(n>0) {
        k[y]=n;
        n=n/10-3*(n%10);
        db++;
        y++;
    }

    if(n==0) {
        cout << "IGEN";
        k[y]=0;
        db++;
    }
    else cout << "NEM";

    if(db==0) {
        cout << endl;
    }
    else {
        cout << endl;
        for(int i=0; i<db; i++) {
            cout << k[i] << " ";
        }
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1876 KiB
2Accepted0/03ms2120 KiB
3Accepted3/33ms2328 KiB
4Accepted3/33ms2580 KiB
5Accepted4/42ms2668 KiB
6Accepted4/43ms2788 KiB
7Accepted4/43ms2952 KiB
8Accepted4/43ms3164 KiB
9Accepted4/43ms3392 KiB
10Accepted4/43ms3404 KiB
11Accepted4/43ms3700 KiB
12Accepted4/43ms3620 KiB
13Accepted4/43ms3804 KiB
14Accepted4/43ms3684 KiB
15Accepted2/23ms3692 KiB
16Wrong answer0/23ms3668 KiB