1042021-01-12 12:35:46Babják PéterOszthatóság 37-telcpp11Wrong answer 33/401ms1836 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;
		if(n<0)
		{
			break;
		}
		if(n==0)
		{
			ans.push_back(0);
			break;
		}
		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<<" ";
		}
	}
}
SubtaskSumTestVerdictTimeMemory
base33/40
1Accepted0/01ms1740 KiB
2Accepted0/01ms1780 KiB
3Accepted3/31ms1832 KiB
4Accepted3/31ms1836 KiB
5Accepted3/31ms1728 KiB
6Accepted3/31ms1832 KiB
7Accepted3/31ms1728 KiB
8Wrong answer0/31ms1832 KiB
9Accepted3/31ms1728 KiB
10Accepted3/31ms1728 KiB
11Accepted3/31ms1728 KiB
12Accepted3/31ms1836 KiB
13Accepted3/31ms1728 KiB
14Accepted3/31ms1832 KiB
15Wrong answer0/21ms1836 KiB
16Wrong answer0/21ms1832 KiB