72982024-01-06 15:12:57szabelrVilágnaptár (45 pont)cpp17Wrong answer 36/453ms3324 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;
    }
    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 <= 1)
            cout << ev << " " << honap - 1 << " " << 29 + nap;
        if (honap == 3 and nap > 1)
            cout << ev << " " << honap << " " << nap - 1;
        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 << " " << "SZN";
        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
base36/45
1Accepted0/03ms2152 KiB
2Accepted0/03ms2284 KiB
3Accepted0/03ms2504 KiB
4Accepted2/23ms2512 KiB
5Accepted2/23ms2732 KiB
6Accepted3/33ms2964 KiB
7Accepted3/33ms3108 KiB
8Accepted3/33ms3188 KiB
9Accepted3/33ms3080 KiB
10Accepted3/33ms3212 KiB
11Wrong answer0/33ms3288 KiB
12Accepted3/33ms3316 KiB
13Accepted3/33ms3320 KiB
14Accepted3/33ms3284 KiB
15Accepted3/33ms3296 KiB
16Accepted3/33ms3236 KiB
17Wrong answer0/33ms3208 KiB
18Accepted2/23ms3212 KiB
19Wrong answer0/33ms3324 KiB