1032021-01-12 12:33:13Babják PéterOszthatóság 37-telcpp11Wrong answer 37/401ms1828 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;
		}
		n=n/10;
		if(n==0)
		{
			ans.push_back(0);
			break;
		}
		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
base37/40
1Accepted0/01ms1740 KiB
2Accepted0/01ms1760 KiB
3Accepted3/31ms1720 KiB
4Accepted3/31ms1720 KiB
5Accepted3/31ms1720 KiB
6Accepted3/31ms1824 KiB
7Accepted3/31ms1720 KiB
8Wrong answer0/31ms1824 KiB
9Accepted3/31ms1824 KiB
10Accepted3/31ms1720 KiB
11Accepted3/31ms1820 KiB
12Accepted3/31ms1820 KiB
13Accepted3/31ms1828 KiB
14Accepted3/31ms1824 KiB
15Accepted2/21ms1720 KiB
16Accepted2/21ms1720 KiB