36772023-03-02 10:39:01DalmaOszthatóság 17-tel (60 pont)cpp17Wrong answer 29/603ms3668 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
base29/60
1Accepted0/03ms2028 KiB
2Accepted0/02ms2160 KiB
3Wrong answer0/32ms2380 KiB
4Accepted3/32ms2508 KiB
5Accepted4/43ms2716 KiB
6Wrong answer0/42ms2812 KiB
7Wrong answer0/42ms2812 KiB
8Accepted5/53ms2972 KiB
9Accepted5/52ms3092 KiB
10Wrong answer0/52ms3252 KiB
11Wrong answer0/52ms3496 KiB
12Accepted6/62ms3608 KiB
13Accepted6/62ms3544 KiB
14Wrong answer0/62ms3544 KiB
15Wrong answer0/22ms3536 KiB
16Wrong answer0/22ms3668 KiB