127412024-12-29 16:29:17ffteklaVilágnaptár (45 pont)cpp17Wrong answer 15/451ms512 KiB
#include <iostream>

using namespace std;

int ev,honap,nap;
int main()
{
    cin>>ev>>honap>>nap;

    if (ev%4!=0) //nem szokoev
    {
        if (honap==12 && nap==31) cout<<ev<<" "<<honap<<" "<<"VN";
          else cout<<ev<<" "<<honap<<" "<<nap;
    }

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