Skip to content

Commit 3669d37

Browse files
committed
Runtime: 3 ms (Top 36.61%) | Memory: 5.9 MB (Top 34.68%)
1 parent 4c8fed6 commit 3669d37

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
// Runtime: 3 ms (Top 36.61%) | Memory: 5.9 MB (Top 34.68%)
12
class Solution {
23
public:
34
double angleClock(int hour, int minutes) {
4-
5+
56
double hourAngle = 30*(double(hour) + double(minutes/60.0));
6-
7+
78
double minuteAngle = 6 * (double)minutes;
8-
9+
910
return 180 - abs(180 - abs(minuteAngle - hourAngle));
10-
11+
1112
}
12-
};
13+
};

0 commit comments

Comments
 (0)