210272026-01-12 08:46:43szjVilágnaptár (45 pont)cpp17Wrong answer 37/451ms512 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    short int a,b,c,d;
    cin >> a >> b >> c;
    short int rendes[13]= {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
    short int vilag[13]= {0, 31, 61, 91, 122, 152, 182, 213, 243, 273, 304, 334, 364};
    d=rendes[b-1]+c;
    if(d>=213)
    {
        cout << a << " " << b << " " << c;
        return 0;
    }
    cout << a << " ";
    if(d==365)
    {
        cout << 12 << " VN";
        return 0;
    }
    else if(a%4==0)
    {
        if(d==182)
        {
            cout << 6 << " SZN";
            return 0;
        }
        if(d>59)d++;
        if(d>182)d--;
    }
    for(int i=0; i<12; i++)
    {
        if(d<=vilag[i+1])
        {
            cout << i+1 << " " << d-vilag[i];
            break;
        }
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base37/45
1Accepted0/01ms316 KiB
2Accepted0/01ms316 KiB
3Wrong answer0/01ms316 KiB
4Accepted2/21ms316 KiB
5Wrong answer0/21ms356 KiB
6Wrong answer0/31ms316 KiB
7Accepted3/31ms316 KiB
8Accepted3/31ms316 KiB
9Accepted3/31ms316 KiB
10Accepted3/31ms512 KiB
11Accepted3/31ms500 KiB
12Accepted3/31ms316 KiB
13Accepted3/31ms384 KiB
14Accepted3/31ms316 KiB
15Wrong answer0/31ms508 KiB
16Accepted3/31ms316 KiB
17Accepted3/31ms500 KiB
18Accepted2/21ms316 KiB
19Accepted3/31ms316 KiB