Cody

Problem 44713. The Google Interview: Two Eggs Problem

Solution 2210454

Submitted on 14 Apr 2020 by Simão Trincheiras
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(Google(1),1))

d = -2 1 d = 1

2   Pass
assert(isequal(Google(5),3))

d = -3.7016 2.7016 d = 3

3   Pass
assert(isequal(Google(20),6))

d = -6.8443 5.8443 d = 6

4   Pass
assert(isequal(Google(50),10))

d = -10.5125 9.5125 d = 10

5   Pass
assert(isequal(Google(75),12))

d = -12.7577 11.7577 d = 12

6   Pass
assert(isequal(Google(100),14))

d = -14.6510 13.6510 d = 14

7   Pass
assert(isequal(Google(120),15))

d = -16 15 d = 15

8   Pass
assert(isequal(Google(180),19))

d = -19.4803 18.4803 d = 19

9   Pass
assert(isequal(Google(250),22))

d = -22.8663 21.8663 d = 22

10   Pass
assert(isequal(Google(320),25))

d = -25.8032 24.8032 d = 25

11   Pass
assert(isequal(Google(360),27))

d = -27.3375 26.3375 d = 27

12   Pass
assert(isequal(Google(410),29))

d = -29.1400 28.1400 d = 29

13   Pass
assert(isequal(Google(500),32))

d = -32.1267 31.1267 d = 32

14   Pass
assert(isequal(Google(610),35))

d = -35.4321 34.4321 d = 35

15   Pass
assert(isequal(Google(1000),45))

d = -45.2242 44.2242 d = 45