39202023-03-05 16:04:10czitaVilágnaptár (45 pont)csharpWrong answer 0/4532ms25992 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace vilagnaptart
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] st = Console.ReadLine().Split().Select(int.Parse).ToArray();
            //int[] st = "2020 1 1".Split().Select(int.Parse).ToArray();
            int[] hod = { 0, 31, 28, 31,  30, 31,  30,  31,   31, 30,  31,  30,  31 };
            int[] hodv = {0, 31, 61, 91, 122, 152, 182, 213, 243, 273, 304, 334, 364, 370 };
            //          { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 364 };
            int ev = st[0];
            int ho = st[1];
            int nap = st[2];
           
            int hossz = 0;
            
            for (int i = 1; i < ho; i++)
            {
                hossz += hod[i];
            }
            int ossznap = hossz + nap;
            //for (int j = 1; j < 367; j++)
            //{
            //    int ossznap =j;
            Console.WriteLine(ossznap);
                string ki = "";
            if (ev % 4 == 0)
                ossznap++;
                if (ev % 4 == 0 && ossznap >= 183)
                {
                    if (ossznap == 183)
                    {
                        ki = ev + " 6 SZN";
                    }
                    else if (ossznap == 366)
                    {
                        ki = ev + " 12 VE";
                    }
                    else
                        ossznap--;
                }
                else
                {
                    if (ossznap == 365)
                    { ki = ev + " 12 VE"; }
                }

                int vev = ev;
                int vho = 0;
                int vnap = 0;
                int ossznapv = 0;

                if (ki == "")
                {
                    for (int i = 1; i < 13; i++)
                    {
                        if (ossznap <= hodv[i])
                        {
                            ki = vev + " " + i + " " + (ossznap - hodv[i - 1]);
                            break;
                        }
                    }
                }
                Console.WriteLine(ki);
           // }
            Console.ReadKey();

        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/45
1Wrong answer0/030ms21996 KiB
2Wrong answer0/029ms22296 KiB
3Wrong answer0/029ms22704 KiB
4Wrong answer0/229ms22680 KiB
5Wrong answer0/232ms23316 KiB
6Wrong answer0/332ms23608 KiB
7Wrong answer0/330ms24092 KiB
8Wrong answer0/330ms24048 KiB
9Wrong answer0/332ms24528 KiB
10Wrong answer0/330ms24220 KiB
11Wrong answer0/330ms24560 KiB
12Wrong answer0/330ms25128 KiB
13Wrong answer0/330ms25220 KiB
14Wrong answer0/330ms25160 KiB
15Wrong answer0/330ms25700 KiB
16Wrong answer0/329ms25868 KiB
17Wrong answer0/329ms25992 KiB
18Wrong answer0/229ms25716 KiB
19Wrong answer0/332ms25876 KiB