Clock shows h hours, m minutes and s seconds after midnight.
Your task is to write a function which returns the time since midnight in milliseconds.
Example:
h = 0
m = 1
s = 1
result = 61000Input constraints:
0 <= h <= 230 <= m <= 590 <= s <= 59
Solution
public class Clock
{
public static int Past(int h, int m, int s)
{
int result = (s*1000) + (m*60000) + (h*3600000);
return result;
}
}