137452025-01-08 16:21:21MrkzOszthatóság 31-gyelcpp17Accepted 50/501ms552 KiB
#include <iostream>

using namespace std;
bool b=false;
void oszthatosag(int x){
    while(x>0){
        x=x/10-(x%10*3);
        if(x>=0){
            cout<<x<<" ";
            b=true;
        }
    }
}
int main()
{
    int x;
    cin>>x;
    if(x%31==0)
        cout<<"IGEN"<<endl;
    else
        cout<<"NEM"<<endl;
    oszthatosag(x);
    if(b==false)
        cout<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms552 KiB
2Accepted0/01ms316 KiB
3Accepted3/31ms500 KiB
4Accepted3/31ms316 KiB
5Accepted4/41ms316 KiB
6Accepted4/41ms316 KiB
7Accepted4/41ms500 KiB
8Accepted4/41ms316 KiB
9Accepted4/41ms356 KiB
10Accepted4/41ms316 KiB
11Accepted4/41ms316 KiB
12Accepted4/41ms316 KiB
13Accepted4/41ms316 KiB
14Accepted4/41ms380 KiB
15Accepted2/21ms316 KiB
16Accepted2/21ms316 KiB