9882022-02-14 18:49:41HobimmSakktábla (75 pont)cpp11Wrong answer 55/752ms2028 KiB
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
    long long n,m,k;
    cin >> n >> m;
    k=min(n,m);
    if (n==m || n==m+1 || m==n+1) {
        int i=0;
    while (i*i<n+m) {
        i++;
    }
    cout << i-1;
    }
    else {
        int j=0;
    while (j*j<k+k+1) {
        j++;
    }
    cout << j-1;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base55/75
1Wrong answer0/02ms1932 KiB
2Accepted0/01ms1928 KiB
3Wrong answer0/51ms1976 KiB
4Wrong answer0/51ms1988 KiB
5Wrong answer0/51ms1988 KiB
6Accepted5/51ms1992 KiB
7Accepted5/51ms2000 KiB
8Accepted5/51ms2004 KiB
9Accepted5/51ms2008 KiB
10Wrong answer0/51ms2008 KiB
11Accepted7/71ms2012 KiB
12Accepted7/71ms2016 KiB
13Accepted7/71ms2016 KiB
14Accepted7/71ms2020 KiB
15Accepted7/71ms2028 KiB