20932022-12-19 08:49:26szabel26Oszthatóság 31-gyelcpp17Wrong answer 48/503ms3652 KiB
#include <iostream>
#include <vector>

using namespace std;

long long n,k;

vector<long long>sz;

int main()
{
    cin>>n;
    if(n%31==0) cout<<"IGEN"<<"\n";
        else cout<<"NEM"<<"\n";

    while (n>0)
    {
        k=n%10;
        n=(n-n%10)/10;
        n-=3*k;
        if(n>=0) sz.push_back(n);
    }

    for(auto &e:sz) cout<<e<<" ";
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1880 KiB
2Accepted0/02ms2116 KiB
3Accepted3/32ms2320 KiB
4Accepted3/32ms2560 KiB
5Accepted4/42ms2808 KiB
6Accepted4/42ms3160 KiB
7Accepted4/42ms3096 KiB
8Accepted4/42ms3048 KiB
9Accepted4/42ms3052 KiB
10Accepted4/42ms3168 KiB
11Accepted4/42ms3052 KiB
12Accepted4/42ms3292 KiB
13Accepted4/42ms3256 KiB
14Accepted4/42ms3448 KiB
15Accepted2/22ms3524 KiB
16Wrong answer0/22ms3652 KiB