209362026-01-11 14:51:27szjVilá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[12]= {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-2]+c;
    cout << a << " ";
    if(d==365)
    {
        cout << b << " VN";
        return 0;
    }
    else if(a%4==0)
    {
        if(d==182)
        {
            cout << b << " SZN";
            return 0;
        }
        if(d>59)d++;
        if(d>183)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/01ms512 KiB
2Wrong answer0/01ms316 KiB
3Accepted0/01ms316 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Wrong answer0/31ms316 KiB
7Accepted3/31ms316 KiB
8Wrong answer0/31ms316 KiB
9Accepted3/31ms316 KiB
10Accepted3/31ms316 KiB
11Accepted3/31ms512 KiB
12Accepted3/31ms316 KiB
13Accepted3/31ms500 KiB
14Accepted3/31ms316 KiB
15Accepted3/31ms316 KiB
16Accepted3/31ms316 KiB
17Accepted3/31ms316 KiB
18Wrong answer0/21ms316 KiB
19Accepted3/31ms316 KiB