51632023-04-20 17:19:05MarkopoloOszthatóság 31-gyelcpp11Wrong answer 0/503ms3956 KiB
#include <iostream>

using namespace std;
void szamol(int &n)
{
    int x,m;
    if(n<=0)
    {
        cout<<"";
    }
    else
    {
        m=n%10;
        n=n/10;
        x=n-(3*m);
        n=x;
        szamol(n);
    }
}
void szamoll(int n)
{
    int x,m;
    if(n<=0)
    {
        cout<<"";
    }
    else
    {
        m=n%10;
        n=n/10;
        x=n-(3*m);
        n=x;
        if(n>=0)
            cout<<n<<" ";
        szamoll(n);
    }
}
int main()
{
    int n,b;
    cout << "Add meg a szamot, es en leellenorzom, h oszthato-e harminc egyel!" << endl;
    cin>>n;
    b=n;
    szamol(n);
    if(n<=0)
    {
        if(n==0)
            cout<<"\nIGEN"<<endl;
        if(n<0)
            cout<<"\nNEM"<<endl;
    }
    szamoll(b);
    cout<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1880 KiB
2Wrong answer0/03ms2112 KiB
3Wrong answer0/33ms2284 KiB
4Wrong answer0/33ms2516 KiB
5Wrong answer0/43ms2564 KiB
6Wrong answer0/43ms2780 KiB
7Wrong answer0/43ms3012 KiB
8Wrong answer0/43ms3232 KiB
9Wrong answer0/42ms3320 KiB
10Wrong answer0/42ms3444 KiB
11Wrong answer0/43ms3852 KiB
12Wrong answer0/42ms3816 KiB
13Wrong answer0/42ms3896 KiB
14Wrong answer0/43ms3916 KiB
15Wrong answer0/22ms3956 KiB
16Wrong answer0/22ms3956 KiB