20882022-12-19 08:18:37gkataOszthatóság 17-tel (60 pont)cpp17Accepted 60/603ms3612 KiB
#include <iostream>
//#include <fstream>

using namespace std;

//ifstream cin("oszt.in");
//ofstream cout("oszt.out");

int a,r,k;

int main()
{
    cin>>a;
    k=a;
    while(k>=5*r)
    {
        r=k%10;
        k=k/10;
        k=k-(5*r);
    }

    if(k%17==0) cout<<"IGEN"<<"\n";
        else cout<<"NEM"<<"\n";

    while(a>0)
    {
        r=a%10;
        a=a/10;
        if(a>=(5*r))
        {
            a=a-(5*r);
            cout<<a<<" ";
        }
        else cout<<"\n";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1876 KiB
2Accepted0/02ms2064 KiB
3Accepted3/32ms2144 KiB
4Accepted3/32ms2388 KiB
5Accepted4/42ms2476 KiB
6Accepted4/42ms2552 KiB
7Accepted4/42ms2544 KiB
8Accepted5/52ms2548 KiB
9Accepted5/52ms2676 KiB
10Accepted5/52ms2880 KiB
11Accepted5/52ms2956 KiB
12Accepted6/62ms3088 KiB
13Accepted6/62ms3328 KiB
14Accepted6/62ms3372 KiB
15Accepted2/22ms3364 KiB
16Accepted2/22ms3612 KiB