73082024-01-06 19:11:36gonterarminOszthatóság 31-gyelcpp17Wrong answer 48/503ms3580 KiB
#include <iostream>

using namespace std;

int main() {
    int n,m;
    cin >> n;
    m=n;
    while (n/10-(n%10*3)>0) {
        n = n/10-(n%10*3);
    }
    if (n%31==0) {
        cout << "IGEN"<<endl;
    } else {
        cout << "NEM"<<endl;
    }
    while (m/10-(m%10*3)>=0) {
        m = m/10-(m%10*3);
        cout<<m<<" ";
        if (m==0) {
            break;
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms2036 KiB
2Accepted0/03ms2164 KiB
3Accepted3/33ms2408 KiB
4Accepted3/33ms2596 KiB
5Accepted4/43ms2840 KiB
6Accepted4/42ms2916 KiB
7Accepted4/43ms3052 KiB
8Accepted4/42ms3104 KiB
9Accepted4/42ms3108 KiB
10Accepted4/43ms3136 KiB
11Accepted4/43ms3220 KiB
12Accepted4/43ms3256 KiB
13Accepted4/43ms3360 KiB
14Accepted4/43ms3448 KiB
15Accepted2/23ms3452 KiB
16Wrong answer0/23ms3580 KiB