31292023-02-19 11:30:00horvathabelOszthatóság 31-gyelcpp17Wrong answer 48/503ms3864 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin>>n;
	vector<int> 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/03ms1812 KiB
2Accepted0/03ms2204 KiB
3Accepted3/33ms2340 KiB
4Accepted3/33ms2552 KiB
5Accepted4/43ms2792 KiB
6Accepted4/43ms2916 KiB
7Accepted4/43ms3104 KiB
8Accepted4/43ms3340 KiB
9Accepted4/43ms3548 KiB
10Accepted4/42ms3468 KiB
11Accepted4/43ms3864 KiB
12Accepted4/42ms3684 KiB
13Accepted4/42ms3580 KiB
14Accepted4/42ms3696 KiB
15Accepted2/23ms3696 KiB
16Wrong answer0/22ms3696 KiB