93022024-02-20 11:41:07Leventusz09Sakktábla (75 pont)csharpWrong answer 70/7532ms25440 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sakktáblatorta{
    class Program{
        static void Main(){
            int[] in1 = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int A = in1.Min();
            int B = in1.Max();

            if (B == 0){
                Console.WriteLine(0);
                return;
            }

            int tmin, i=0;
            while(true){
                tmin = i * i / 2;
                if (A < tmin || B < tmin + 1) break;
                i++;
            }
            Console.WriteLine(i-1);

        }
    }
}
SubtaskSumTestVerdictTimeMemory
base70/75
1Accepted0/032ms21772 KiB
2Accepted0/032ms22600 KiB
3Accepted5/532ms22404 KiB
4Accepted5/532ms23292 KiB
5Wrong answer0/532ms23144 KiB
6Accepted5/532ms23788 KiB
7Accepted5/532ms23648 KiB
8Accepted5/532ms23460 KiB
9Accepted5/532ms23944 KiB
10Accepted5/532ms24176 KiB
11Accepted7/732ms24656 KiB
12Accepted7/732ms25264 KiB
13Accepted7/732ms25344 KiB
14Accepted7/732ms25440 KiB
15Accepted7/732ms25384 KiB