73722024-01-08 11:57:16madvirVilágnaptár (45 pont)cpp17Wrong answer 30/453ms3004 KiB
#include <iostream>

using namespace std;

int main()
{
    int ev, ho, nap;

    cin >> ev >> ho >> nap;

    cout << ev << " ";

    if(ho==12 && nap==31) cout << ho << " VN";
    else {
    if(ev%4==0) {
        if(ho==7 && nap==1) {
            cout << 6 << " SZN";
        }
        if(ho==3) {
            if(nap==1) {
                cout << ho-1 << " " << 30;
            }
            else {
                if(ho==5 || ho==8) {
                    if(nap==1) cout << ho-1 << 31;
                    else cout << ho << " " << nap-1;
                }
                else cout << ho << " " << nap;
            }
        }
        else {

        }
    }
    else {
        if(ho==3) {
            if(nap==1 || nap==2) {
                cout << ho-1 << " " << 28+nap;
            }
            else {
                    cout << ho << " " << nap-2;
            }
        }
        else {
            if(ho==5) {
                if(nap==1 || nap==2) {
                    cout << ho-1 << " " << 29+nap;
                }
                else {
                    cout << ho << " " << nap-2;
                }
            }
            else {
                if(ho==4 || ho==6 || ho==7) {
                    if(nap==1) cout << ho-1 << " " << 30;
                    else cout << ho << " " << nap-1;
                }
                else {
                    if(ho==8) {
                        if(nap==1) cout << ho-1 << " " << 31;
                    }
                    else {
                        cout << ho << " " << nap;
                    }
                }
            }
        }
    }
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/45
1Accepted0/03ms1880 KiB
2Accepted0/03ms2120 KiB
3Accepted0/03ms2332 KiB
4Accepted2/23ms2568 KiB
5Accepted2/23ms2620 KiB
6Wrong answer0/32ms2572 KiB
7Accepted3/33ms2576 KiB
8Accepted3/32ms2576 KiB
9Accepted3/33ms2704 KiB
10Wrong answer0/33ms2784 KiB
11Wrong answer0/33ms2788 KiB
12Accepted3/32ms2792 KiB
13Accepted3/33ms2792 KiB
14Accepted3/33ms2916 KiB
15Wrong answer0/33ms2996 KiB
16Accepted3/33ms3004 KiB
17Accepted3/33ms3004 KiB
18Accepted2/23ms3000 KiB
19Wrong answer0/33ms3000 KiB