7482022-01-05 17:08:25seprbarOszthatóság 31-gyelcpp11Wrong answer 25/502ms1900 KiB
// Oszthatosag 31-el

#include <bits/stdc++.h>
using namespace std;

#define f(N) (((N)-((N)%10))/10) 
#define l(N) (N%10)

void ls(vector <long> v) {
	for (const long& i : v) {
		cout << i << " ";
	}
}

int main () {	
	
	long N;
	vector <long> steps;
	cin >> N;
	
	while (N > 0) {
		N = f(N)-3*l(N);
		steps.push_back(N);
	}
	if (N == 0) {
		cout << "IGEN\n";
		ls(steps);
	}
	else cout << "NEM";
}
SubtaskSumTestVerdictTimeMemory
base25/50
1Accepted0/02ms1776 KiB
2Wrong answer0/01ms1832 KiB
3Wrong answer0/31ms1844 KiB
4Accepted3/31ms1848 KiB
5Accepted4/41ms1844 KiB
6Wrong answer0/41ms1852 KiB
7Wrong answer0/41ms1860 KiB
8Accepted4/42ms1856 KiB
9Accepted4/41ms1860 KiB
10Wrong answer0/42ms1872 KiB
11Accepted4/41ms1868 KiB
12Wrong answer0/41ms1876 KiB
13Wrong answer0/41ms1884 KiB
14Accepted4/42ms1896 KiB
15Accepted2/21ms1900 KiB
16Wrong answer0/21ms1896 KiB