45062023-03-29 11:19:52PallanekPéterSakktábla (75 pont)python3Wrong answer 60/7518ms13736 KiB
import math
n,m=[int(i) for i in input().split()]
if (n>m):
    n=m+1
if (m>n):
    m=n+1
while math.sqrt(n*2)%1!=0 and math.sqrt(n*2+1)%1!=0:
    n-=1
if math.sqrt(n*2)%1==0:
    print(int(math.sqrt(n*2)))
elif math.sqrt(n*2+1)%1==0:
    print(int(math.sqrt(n*2+1)))
SubtaskSumTestVerdictTimeMemory
base60/75
1Accepted0/017ms11148 KiB
2Accepted0/017ms11396 KiB
3Accepted5/517ms11312 KiB
4Accepted5/517ms11828 KiB
5Accepted5/517ms11832 KiB
6Wrong answer0/517ms11788 KiB
7Wrong answer0/517ms12276 KiB
8Wrong answer0/517ms12500 KiB
9Accepted5/517ms12420 KiB
10Accepted5/517ms12804 KiB
11Accepted7/718ms13148 KiB
12Accepted7/717ms13396 KiB
13Accepted7/717ms13580 KiB
14Accepted7/718ms13352 KiB
15Accepted7/717ms13736 KiB