562021-01-09 16:02:05mraronOszthatóság 37-telcpp11Accepted 40/401ms1844 KiB
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<cassert>
#include<cassert>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
#include<stack>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<sstream>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<numeric>
#include<random>
#include<chrono>
#include<bitset>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define all(x) (x).begin(), (x).end()
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define sz(x) (int)(x).size()
#define gc getchar
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define mp make_pair

#ifndef ONLINE_JUDGE
#  define LOG(x) (cerr << #x << " = " << (x) << endl)
#else
#  define LOG(x) ((void)0)
#endif

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef tree<pair<int,int>, null_type, less<pair<int,int>>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;


const double PI=acos(-1);
const ll INF = 1LL<<62;
const ll MINF = -(1LL<<62);

template<typename T> T getint() {
	T val=0;
	char c;
	
	bool neg=false;
	while((c=gc()) && !(c>='0' && c<='9')) {
		neg|=c=='-';
	}

	do {
		val=(val*10)+c-'0';
	} while((c=gc()) && (c>='0' && c<='9'));

	return val*(neg?-1:1);
}

//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); uniform_int_distribution<int>(0, n-1)(rng)


int main() {
	IO;
	int n;
	cin>>n;
	vector<int> res;
	res.pb(n);
	while(res.back()>0) {
		res.pb(res.back()/10-11*(res.back()%10));
	}
	if(n%37) cout<<"NEM\n";
	else cout<<"IGEN\n";
	
	for(int i=1;i<sz(res)-(res.back()!=0);++i) cout<<res[i]<<" ";
	cout<<"\n";
	
	return 0;
}

SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/01ms1752 KiB
2Accepted0/01ms1780 KiB
3Accepted3/31ms1836 KiB
4Accepted3/31ms1836 KiB
5Accepted3/31ms1844 KiB
6Accepted3/31ms1840 KiB
7Accepted3/31ms1840 KiB
8Accepted3/31ms1840 KiB
9Accepted3/31ms1840 KiB
10Accepted3/31ms1840 KiB
11Accepted3/31ms1844 KiB
12Accepted3/31ms1836 KiB
13Accepted3/31ms1840 KiB
14Accepted3/31ms1844 KiB
15Accepted2/21ms1840 KiB
16Accepted2/21ms1836 KiB