36792023-03-02 10:40:25DalmaOszthatóság 17-tel (60 pont)cpp17Wrong answer 56/603ms3528 KiB
#include <iostream>

using namespace std;

int main()
{
    int N;
    cin >> N;
    if (N%17==0)
    {
        cout << "IGEN" << endl;
        int oszthatosag=N;
        int ellenor=0;
        oszthatosag=(oszthatosag/10)-(5*(oszthatosag%10));
        while (oszthatosag>=0&&ellenor<1)
        {
            cout << oszthatosag << " ";
            if (oszthatosag==0)
                ellenor++;
            oszthatosag=(oszthatosag/10)-(5*(oszthatosag%10));
        }
    }
    else
    {
        cout << "NEM" << endl;
        int oszthatosag=N;
        int ellenor=0;
        oszthatosag=(oszthatosag/10)-(5*(oszthatosag%10));
        while (oszthatosag>=0&&ellenor<1)
        {
            cout << oszthatosag << " ";
            if (oszthatosag==0)
                ellenor++;
            oszthatosag=(oszthatosag/10)-(5*(oszthatosag%10));
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base56/60
1Accepted0/03ms1748 KiB
2Accepted0/02ms1908 KiB
3Accepted3/32ms2000 KiB
4Accepted3/32ms2124 KiB
5Accepted4/42ms2332 KiB
6Accepted4/43ms2588 KiB
7Accepted4/42ms2668 KiB
8Accepted5/52ms2800 KiB
9Accepted5/52ms2844 KiB
10Accepted5/52ms2988 KiB
11Accepted5/53ms3220 KiB
12Accepted6/62ms3308 KiB
13Accepted6/62ms3308 KiB
14Accepted6/62ms3388 KiB
15Wrong answer0/22ms3384 KiB
16Wrong answer0/22ms3528 KiB