1062021-01-12 13:09:39Babják PéterOszthatóság 37-telcpp11Accepted 40/401ms1840 KiB
#include <iostream>
#include <vector>
#define ll long long
using namespace std;
main()
{
	int n;cin>>n;
	vector<ll>ans;
	bool b=(n%37==0);
	while(n>0)
	{
		int z=n%10;
		n-=z;
		n=n/10;
		n-=z*11;
		if(n>=0)
		{
			ans.push_back(n);
		}
	}
	if(b)
	{
		cout<<"IGEN"<<endl;
		for(int u: ans)
		{
			cout<<u<<" ";
		}
	}
	else
	{
		cout<<"NEM"<<endl;
		for(int u: ans)
		{
			cout<<u<<" ";
		}
	}
	cout<<endl;
}
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/01ms1740 KiB
2Accepted0/01ms1776 KiB
3Accepted3/31ms1836 KiB
4Accepted3/31ms1836 KiB
5Accepted3/31ms1840 KiB
6Accepted3/31ms1836 KiB
7Accepted3/31ms1836 KiB
8Accepted3/31ms1836 KiB
9Accepted3/31ms1832 KiB
10Accepted3/31ms1732 KiB
11Accepted3/31ms1732 KiB
12Accepted3/31ms1836 KiB
13Accepted3/31ms1732 KiB
14Accepted3/31ms1836 KiB
15Accepted2/21ms1732 KiB
16Accepted2/21ms1836 KiB