50022023-04-08 20:07:12Laci3000Sakktábla (75 pont)cpp17Accepted 75/753ms3592 KiB


#include <iostream>
#include <math.h>
using namespace std;

void megoldo() {
    int kocka1;
    int kocka2;
    cin >> kocka1;
    cin >> kocka2;
    int gyokertek;
    if (kocka1 < kocka2) {

        gyokertek = sqrt(kocka1 * 2 + 1);
        
    }
    else if (kocka2 < kocka1) {
        gyokertek = sqrt(kocka2 * 2 + 1);

    }else{
        gyokertek = sqrt(kocka2 * 2);
    }


        cout << gyokertek;
}

int main()
{
    megoldo();
}

SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1876 KiB
2Accepted0/03ms2064 KiB
3Accepted5/53ms2312 KiB
4Accepted5/53ms2364 KiB
5Accepted5/53ms2604 KiB
6Accepted5/53ms2740 KiB
7Accepted5/53ms2916 KiB
8Accepted5/53ms3152 KiB
9Accepted5/53ms3420 KiB
10Accepted5/52ms3388 KiB
11Accepted7/73ms3360 KiB
12Accepted7/72ms3476 KiB
13Accepted7/73ms3592 KiB
14Accepted7/72ms3588 KiB
15Accepted7/72ms3592 KiB