72972024-01-06 15:10:34szabelrVilágnaptár (45 pont)cpp17Wrong answer 25/453ms3908 KiB
#include <iostream>
using namespace std;
int main()
{
    int ev, honap, nap;
    cin >> ev >> honap >> nap;
    if (ev % 4 != 0)
    {
        if (honap == 1 or honap == 9 or honap == 10 or honap==11 or honap==2)
           cout << ev << " " << honap << " " << nap;
        if(honap==12 and nap<31)
           cout << ev << " " << honap << " " << nap;
        if(honap == 12 and nap == 31)
            cout << ev << " " << honap << " " << "VN";
        if (honap == 3 and nap <=2)
            cout << ev << " " << honap-1 << " " << 28+nap;
        if (honap == 3 and nap > 2)
            cout << ev << " " << honap  << " " << nap-2;
        if(honap==4 and nap ==1)
            cout << ev << " " << honap-1 << " " << "31";
        if (honap == 4 and nap > 1)
            cout << ev << " " << honap << " " << nap - 1;
        if (honap == 5 and nap <= 2)
            cout << ev << " " << honap - 1 << " " << 29 + nap;
        if (honap == 5 and nap > 2)
            cout << ev << " " << honap  << " " << nap-2;
        if (honap == 6 and nap == 1)
            cout << ev << " " << honap - 1 << " " << "31";
        if (honap == 6 and nap >= 1)
            cout << ev << " " << honap << " " << nap-1;
        if(honap==7 and nap==1)
            cout << ev << " " << honap-1 << " " << "30";
        if (honap == 7 and nap > 1)
            cout << ev << " " << honap << " " << nap-1;
        if (honap == 8 and nap == 1)
            cout << ev << " " << honap - 1 << " " << "31";
        if (honap == 8 and nap > 1)
            cout << ev << " " << honap << " " << nap - 1;
    }
}
SubtaskSumTestVerdictTimeMemory
base25/45
1Accepted0/03ms1880 KiB
2Wrong answer0/03ms2108 KiB
3Accepted0/03ms2372 KiB
4Accepted2/22ms2404 KiB
5Accepted2/22ms2440 KiB
6Wrong answer0/33ms2636 KiB
7Wrong answer0/33ms2868 KiB
8Accepted3/33ms2920 KiB
9Accepted3/33ms3088 KiB
10Wrong answer0/33ms3096 KiB
11Wrong answer0/33ms3108 KiB
12Accepted3/33ms3232 KiB
13Accepted3/33ms3248 KiB
14Accepted3/33ms3320 KiB
15Accepted3/33ms3588 KiB
16Accepted3/33ms3708 KiB
17Wrong answer0/33ms3796 KiB
18Wrong answer0/23ms3908 KiB
19Wrong answer0/33ms3884 KiB