36752023-03-02 10:36:28DalmaOszthatóság 17-tel (60 pont)cpp17Wrong answer 9/603ms4020 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
base9/60
1Accepted0/03ms2132 KiB
2Accepted0/02ms2220 KiB
3Wrong answer0/33ms2232 KiB
4Accepted3/33ms2592 KiB
5Wrong answer0/42ms2608 KiB
6Wrong answer0/42ms2732 KiB
7Wrong answer0/42ms2900 KiB
8Wrong answer0/52ms3108 KiB
9Wrong answer0/52ms3324 KiB
10Wrong answer0/53ms3532 KiB
11Wrong answer0/52ms3544 KiB
12Wrong answer0/62ms3540 KiB
13Accepted6/62ms3664 KiB
14Wrong answer0/63ms3912 KiB
15Wrong answer0/22ms3880 KiB
16Wrong answer0/23ms4020 KiB