127792024-12-30 12:11:51feheristvanVilágnaptár (45 pont)cpp17Wrong answer 12/451ms560 KiB
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int ev, honap, nap;
    cin >> ev >> honap >> nap;
    if((ev - 1) % 4 == 0 && honap == 1 && nap == 1){
        cout << ev - 1 << " " << 12 << " VN";
        return 0;
    }
    if(ev % 4 != 0){
        cout << ev << " " << honap << " ";
        if(honap == 12 && nap == 31)
            cout << "VN";
        else
            cout << nap;
        return 0;
    }
    if(honap <= 6){
       cout << ev << " " << honap << " " << nap;
       return 0;
    }
    if(honap == 7){
        if(nap == 1){
           cout << ev << " " << honap - 1 << " " << "SZN";
        }
        else{
            cout << ev << " " << honap << " " << nap - 1;
        }
        return 0;
    }
    if(honap == 8 || honap == 11){
        if(nap == 1)
            cout << ev << " " << honap - 1 << " " << 31;
        else{
            cout << ev << " " << honap << " " << nap - 1;
        }
    }
    if(honap == 9 || honap == 10 || honap == 12){
        if(nap == 1)
            cout << ev << " " << honap - 1 << " " << 30;
        else{
            cout << ev << " " << honap << " " << nap - 1;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base12/45
1Accepted0/01ms560 KiB
2Accepted0/01ms508 KiB
3Accepted0/01ms320 KiB
4Accepted2/21ms320 KiB
5Accepted2/21ms320 KiB
6Accepted3/31ms320 KiB
7Wrong answer0/31ms500 KiB
8Wrong answer0/31ms320 KiB
9Wrong answer0/31ms320 KiB
10Wrong answer0/31ms320 KiB
11Wrong answer0/31ms400 KiB
12Wrong answer0/31ms320 KiB
13Wrong answer0/31ms508 KiB
14Wrong answer0/31ms508 KiB
15Wrong answer0/31ms320 KiB
16Wrong answer0/31ms324 KiB
17Wrong answer0/31ms320 KiB
18Accepted2/21ms368 KiB
19Accepted3/31ms320 KiB