42822023-03-21 19:50:23xxxSakktábla (75 pont)cpp14Accepted 75/753ms3884 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    int temp;
    if (n != m)
        temp = (min(n, m) * 2) + 1;
    else
        temp = n + m;
    for (int i = sqrt(temp); i > 0; i--) {
        if (i * i <= temp) {
            cout << i << endl;
            return 0;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1748 KiB
2Accepted0/03ms1912 KiB
3Accepted5/53ms2124 KiB
4Accepted5/53ms2336 KiB
5Accepted5/53ms2552 KiB
6Accepted5/53ms2764 KiB
7Accepted5/53ms2972 KiB
8Accepted5/53ms3184 KiB
9Accepted5/52ms3264 KiB
10Accepted5/52ms3392 KiB
11Accepted7/73ms3504 KiB
12Accepted7/73ms3512 KiB
13Accepted7/73ms3512 KiB
14Accepted7/73ms3636 KiB
15Accepted7/73ms3884 KiB