Cody

# Problem 44741. You are constantly moving at a speed v faster than your twin brother. How long does it take before you become 1s younger than him according to the theory of relativity?

Solution 1637969

Submitted on 4 Oct 2018
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   Fail
v_in = 100; % km/h yearsCorrect = 241830; % years years = becomeOneSecondYounger(v_in); assert(abs(yearsCorrect-years)<10)

Undefined function or variable 'v'. Error in becomeOneSecondYounger (line 3) gamma=1/sqrt((1-(v/c)^2)); Error in Test1 (line 3) years = becomeOneSecondYounger(v_in);

2   Fail
v_in = 1000; % km/h yearsCorrect = 2418.7; % years years = becomeOneSecondYounger(v_in); assert(abs(yearsCorrect-years)<0.1)

Undefined function or variable 'v'. Error in becomeOneSecondYounger (line 3) gamma=1/sqrt((1-(v/c)^2)); Error in Test2 (line 3) years = becomeOneSecondYounger(v_in);

3   Fail
v_in = 10000; % km/h yearsCorrect = 24.187; % years years = becomeOneSecondYounger(v_in); assert(abs(yearsCorrect-years)<0.01)

Undefined function or variable 'v'. Error in becomeOneSecondYounger (line 3) gamma=1/sqrt((1-(v/c)^2)); Error in Test3 (line 3) years = becomeOneSecondYounger(v_in);

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!