51762023-04-20 17:40:37MarkopoloOszthatóság 31-gyelcpp11Wrong answer 0/503ms3300 KiB
#include <iostream>

using namespace std;
void szamol(int &n)
{
    int x,m;
    if(n<=0)
    {
        return;
    }
    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)
    {
        return;
    }
    else
    {
        m=n%10;
        n=n/10;
        x=n-(3*m);
        n=x;
        if(n>=0)
            cout<<n<<" ";
        if(n<62 && n>31)
            cout<<n-31;
        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<<"IGEN"<<endl;
        if(n<0)
            cout<<"NEM"<<endl;
    }
    szamoll(b);
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1876 KiB
2Wrong answer0/03ms2076 KiB
3Wrong answer0/33ms2292 KiB
4Wrong answer0/32ms2372 KiB
5Wrong answer0/43ms2644 KiB
6Wrong answer0/43ms2600 KiB
7Wrong answer0/43ms2720 KiB
8Wrong answer0/43ms2952 KiB
9Wrong answer0/43ms3032 KiB
10Wrong answer0/43ms3032 KiB
11Wrong answer0/43ms3156 KiB
12Wrong answer0/43ms3168 KiB
13Wrong answer0/43ms3164 KiB
14Wrong answer0/42ms3172 KiB
15Wrong answer0/23ms3168 KiB
16Wrong answer0/23ms3300 KiB