Cody

# Problem 392. Clock Hand Angle 1

Solution 594942

Submitted on 11 Mar 2015 by goc3
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(abs(handAngle('12:00:00')-0) < 1e-9)

s = '12' '00' '00' H = 12 M = 0 S = 0 aH = 360 aM = 0 theta = 360 theta = 0

2   Pass
%% assert(abs(handAngle('03:28:07')-64.6416666667) < 1e-9)

s = '03' '28' '07' H = 3 M = 28 S = 7 aH = 104.0583 aM = 168.7000 theta = 64.6417

3   Pass
%% assert(abs(handAngle('12:26:23')-145.1083333333) < 1e-9)

s = '12' '26' '23' H = 12 M = 26 S = 23 aH = 373.1917 aM = 158.3000 theta = 214.8917 theta = 145.1083

4   Pass
%% assert(abs(handAngle('09:50:12')-6.1000000000) < 1e-9)

s = '09' '50' '12' H = 9 M = 50 S = 12 aH = 295.1000 aM = 301.2000 theta = 6.1000

5   Pass
%% assert(abs(handAngle('07:06:30')-174.2500000000) < 1e-9)

s = '07' '06' '30' H = 7 M = 6 S = 30 aH = 213.2500 aM = 39 theta = 174.2500

6   Pass
%% assert(abs(handAngle('06:08:21')-134.0750000000) < 1e-9)

s = '06' '08' '21' H = 6 M = 8 S = 21 aH = 184.1750 aM = 50.1000 theta = 134.0750

7   Pass
%% assert(abs(handAngle('01:11:58')-35.8166666667) < 1e-9)

s = '01' '11' '58' H = 1 M = 11 S = 58 aH = 35.9833 aM = 71.8000 theta = 35.8167

8   Pass
%% assert(abs(handAngle('09:24:56')-132.8666666667) < 1e-9)

s = '09' '24' '56' H = 9 M = 24 S = 56 aH = 282.4667 aM = 149.6000 theta = 132.8667

9   Pass
%% assert(abs(handAngle('01:50:04')-114.6333333333) < 1e-9)

s = '01' '50' '04' H = 1 M = 50 S = 4 aH = 55.0333 aM = 300.4000 theta = 245.3667 theta = 114.6333

10   Pass
%% assert(abs(handAngle('01:49:45')-116.3750000000) < 1e-9)

s = '01' '49' '45' H = 1 M = 49 S = 45 aH = 54.8750 aM = 298.5000 theta = 243.6250 theta = 116.3750

11   Pass
%% assert(abs(handAngle('07:04:17')-173.5583333333) < 1e-9)

s = '07' '04' '17' H = 7 M = 4 S = 17 aH = 212.1417 aM = 25.7000 theta = 186.4417 theta = 173.5583

12   Pass
%% assert(abs(handAngle('02:24:26')-74.3833333333) < 1e-9)

s = '02' '24' '26' H = 2 M = 24 S = 26 aH = 72.2167 aM = 146.6000 theta = 74.3833

13   Pass
%% assert(abs(handAngle('10:32:33')-120.9750000000) < 1e-9)

s = '10' '32' '33' H = 10 M = 32 S = 33 aH = 316.2750 aM = 195.3000 theta = 120.9750

14   Pass
%% assert(abs(handAngle('10:26:57')-151.7750000000) < 1e-9)

s = '10' '26' '57' H = 10 M = 26 S = 57 aH = 313.4750 aM = 161.7000 theta = 151.7750

15   Pass
%% assert(abs(handAngle('09:40:26')-47.6166666667) < 1e-9)

s = '09' '40' '26' H = 9 M = 40 S = 26 aH = 290.2167 aM = 242.6000 theta = 47.6167

16   Pass
%% assert(abs(handAngle('02:38:59')-154.4083333333) < 1e-9)

s = '02' '38' '59' H = 2 M = 38 S = 59 aH = 79.4917 aM = 233.9000 theta = 154.4083

17   Pass
%% assert(abs(handAngle('08:18:19')-139.2583333333) < 1e-9)

s = '08' '18' '19' H = 8 M = 18 S = 19 aH = 249.1583 aM = 109.9000 theta = 139.2583

18   Pass
%% assert(abs(handAngle('07:26:43')-63.0583333333) < 1e-9)

s = '07' '26' '43' H = 7 M = 26 S = 43 aH = 223.3583 aM = 160.3000 theta = 63.0583

19   Pass
%% assert(abs(handAngle('12:01:40')-9.1666666667) < 1e-9)

s = '12' '01' '40' H = 12 M = 1 S = 40 aH = 360.8333 aM = 10 theta = 350.8333 theta = 9.1667

20   Pass
%% assert(abs(handAngle('08:60:33')-93.0250000000) < 1e-9)

s = '08' '60' '33' H = 8 M = 60 S = 33 aH = 270.2750 aM = 363.3000 theta = 93.0250

21   Pass
%% assert(abs(handAngle('10:11:42')-124.3500000000) < 1e-9)

s = '10' '11' '42' H = 10 M = 11 S = 42 aH = 305.8500 aM = 70.2000 theta = 235.6500 theta = 124.3500