45242023-03-29 12:26:31TortelliniJrSakktábla (75 pont)csharpAccepted 75/7530ms25140 KiB
using System;
using System.Linq;
namespace Sakktáblatorta
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] inp = Console.ReadLine().Split().Select(int.Parse).ToArray();
            if (inp[0] < inp[1])
            {
                Console.WriteLine((int)(Math.Sqrt(inp[0] * 2 + 1)));
            }
            else if (inp[1] < inp[0])
            {
                Console.WriteLine((int)(Math.Sqrt(inp[1] * 2 + 1)));
            }
            else
            {
                Console.WriteLine((int)Math.Sqrt(inp[0] + inp[1]));
            }
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/030ms21640 KiB
2Accepted0/030ms22364 KiB
3Accepted5/530ms22300 KiB
4Accepted5/530ms22300 KiB
5Accepted5/530ms23044 KiB
6Accepted5/530ms23008 KiB
7Accepted5/530ms23428 KiB
8Accepted5/530ms24056 KiB
9Accepted5/529ms23844 KiB
10Accepted5/529ms24292 KiB
11Accepted7/730ms24248 KiB
12Accepted7/730ms24400 KiB
13Accepted7/730ms24608 KiB
14Accepted7/730ms24432 KiB
15Accepted7/730ms25140 KiB