42842023-03-21 19:51:15xxxSakktábla (75 pont)cpp14Accepted 75/753ms3432 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/03ms1876 KiB
2Accepted0/03ms2120 KiB
3Accepted5/53ms2280 KiB
4Accepted5/53ms2488 KiB
5Accepted5/53ms2700 KiB
6Accepted5/53ms2788 KiB
7Accepted5/53ms2916 KiB
8Accepted5/53ms3128 KiB
9Accepted5/52ms3212 KiB
10Accepted5/53ms3240 KiB
11Accepted7/73ms3316 KiB
12Accepted7/73ms3424 KiB
13Accepted7/73ms3428 KiB
14Accepted7/72ms3432 KiB
15Accepted7/72ms3308 KiB