111772024-07-13 23:32:38probaSakktábla (75 pont)python3Accepted 75/7518ms3056 KiB
x = input()
N = [int(x.split(' ')[0]), int(x.split(' ')[1])]
N.sort()
d = int((2*N[0])**0.5)

marad = True
while marad:
    marad = False
    if d % 2 == 0 and d*d/2 <= N[0]:
        
        if (d+2)*d/2 <= N[0] and (d+2)*d/2+1 <= N[1]:
            d += 1
            marad = True
    else:
        if ((d+2)*d/2) <= N[0]:
            if (d+1)**2/2 <= N[0]:
                d += 1
                marad = True
print(d)                
            
            
    
        
        
        


SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/018ms2960 KiB
2Accepted0/017ms3044 KiB
3Accepted5/517ms2960 KiB
4Accepted5/517ms3036 KiB
5Accepted5/518ms2956 KiB
6Accepted5/517ms3044 KiB
7Accepted5/518ms2896 KiB
8Accepted5/517ms3048 KiB
9Accepted5/517ms2936 KiB
10Accepted5/517ms3044 KiB
11Accepted7/717ms3044 KiB
12Accepted7/718ms3056 KiB
13Accepted7/717ms2844 KiB
14Accepted7/717ms3044 KiB
15Accepted7/717ms2952 KiB