2142021-02-18 11:37:16kicsiboglarOszthatóság 37-telcpp11Wrong answer 38/402ms1976 KiB
#include <iostream>
#include <vector>

using namespace std;
long long a,i,n;
vector <int> megold;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    cin>>n;
    if (n==0)
    {
        cout<<"IGEN\n\n";
        return 0;
    }
    a=n;
    while (a>0)
    {
        i=a%10;
        a=a/10;
        a-=i*11;
        if (a>=0) megold.push_back(a);
    }
    if (megold.empty())
    {
        cout<<"NEM\n\n";
        return 0;
    }
    a=megold.size();
    if (megold[a-1]%37==0)
    {
        cout<<"IGEN\n";
        for (auto e:megold) cout<<e<<" ";
    }
    else
    {
        cout<<"NEM\n";
        if (!megold.empty())
        {
             for (auto e:megold) cout<<e<<" ";
        }
        else cout<<"\n";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base38/40
1Accepted0/02ms1824 KiB
2Accepted0/01ms1876 KiB
3Accepted3/31ms1924 KiB
4Accepted3/31ms1932 KiB
5Accepted3/32ms1928 KiB
6Accepted3/31ms1932 KiB
7Accepted3/31ms1940 KiB
8Accepted3/31ms1940 KiB
9Accepted3/31ms1948 KiB
10Accepted3/31ms1952 KiB
11Accepted3/31ms1960 KiB
12Accepted3/31ms1960 KiB
13Accepted3/31ms1960 KiB
14Accepted3/31ms1968 KiB
15Wrong answer0/21ms1976 KiB
16Accepted2/21ms1976 KiB