31282023-02-19 11:28:40horvathabelOszthatóság 31-gyelcpp17Wrong answer 48/503ms4008 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin>>n;
	vector<int> ans; 

	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/03ms1684 KiB
2Accepted0/03ms1928 KiB
3Accepted3/33ms2172 KiB
4Accepted3/33ms2352 KiB
5Accepted4/43ms2488 KiB
6Accepted4/43ms2700 KiB
7Accepted4/43ms2944 KiB
8Accepted4/43ms3160 KiB
9Accepted4/42ms3208 KiB
10Accepted4/43ms3340 KiB
11Accepted4/42ms3424 KiB
12Accepted4/43ms3668 KiB
13Accepted4/43ms3760 KiB
14Accepted4/43ms3904 KiB
15Accepted2/23ms3876 KiB
16Wrong answer0/23ms4008 KiB