132582025-01-07 11:08:49nkbalintVilágnaptár (45 pont)cpp17Wrong answer 2/451ms508 KiB
#include <iostream>

using namespace std;

int a, b, c, v[13], x[13], i,d,e;

int main()
{
    cin >> a >> b >> c;
    v[1] = 31;
    if (a % 4 == 0) v[2] = 29;
    else v[2] = 28;
    v[3] = 31;
    v[4] = 30;
    v[5] = 31;
    v[6] = 30;
    v[7] = 31;
    v[8] = 31;
    v[9] = 30;
    v[10] = 31;
    v[11] = 30;
    v[12] = 31;
    x[1] = 31;
    x[2] = 30;
    x[3] = 30;
    x[4] = 31;
    x[5] = 30;
    if (a % 4 == 0) x[6] = 31;
    else x[6] = 30;
    x[7] = 31;
    x[8] = 30;
    x[9] = 30;
    x[10] = 31;
    x[11] = 30;
    x[12] = 30;
    for (i = 1;i < b;++i)
    {
        d = d + v[i];
    }
    d = d + c;
    e = d;
    i = 1;
    while (d - x[i] > 0)
    {
        d = d - x[i];
        ++i;
    }
    if (a % 4 == 0 && e == 183) cout << a << " " << i << " " << "SZN";
    else if (i == 13) cout << a << " " << 6 << " " << "VN";
    else cout << a <<" "<< 12 <<" "<< d;

}

SubtaskSumTestVerdictTimeMemory
base2/45
1Wrong answer0/01ms316 KiB
2Accepted0/01ms316 KiB
3Wrong answer0/01ms508 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/31ms320 KiB
13Wrong answer0/31ms316 KiB
14Wrong answer0/31ms316 KiB
15Wrong answer0/31ms316 KiB
16Wrong answer0/31ms508 KiB
17Wrong answer0/31ms316 KiB
18Accepted2/21ms500 KiB
19Wrong answer0/31ms316 KiB