31302023-02-19 12:07:34horvathabelOszthatóság 31-gyelcpp17Wrong answer 48/503ms3832 KiB
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
	ll n;
	cin>>n;
	vector<ll> ans; 
	if (n==0) ans.push_back(0); 
	while (n>0){
		int x=n%10;
		n=n/10;
		n-=x*3;
		ans.push_back(n);
	}
	if (n==0){
		cout<<"IGEN"<<endl;
		for (auto x:ans) cout<<x<<" "; 
	}
	else{
		cout<<"NEM"<<endl;
		for (int i=0; i<ans.size()-1;i++) cout<<ans[i]<<" ";  
	}
	 
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/03ms1808 KiB
2Accepted0/02ms1936 KiB
3Accepted3/32ms2004 KiB
4Accepted3/33ms2132 KiB
5Accepted4/43ms2348 KiB
6Accepted4/43ms2556 KiB
7Accepted4/42ms2688 KiB
8Accepted4/43ms2804 KiB
9Accepted4/43ms2892 KiB
10Accepted4/43ms3100 KiB
11Accepted4/43ms3312 KiB
12Accepted4/42ms3396 KiB
13Accepted4/43ms3408 KiB
14Accepted4/43ms3620 KiB
15Accepted2/22ms3704 KiB
16Wrong answer0/23ms3832 KiB