I work from Monday to Friday. I start my day at
8:12 and have lunch from
12:42. My workday ends at
If you are wondering why 8:12 and 12:42:
8:00is the goal, but I never actually make it
12:42because I take 45 minute breaks, but this works better for the challenge spec
Write a function or full program that returns the smallest fraction of time I have worked and still need to work for the current week. The interval you must use is 6 min.
Each day has 76 six-minute intervals
Monday 02:00 -> 0/1 Monday 08:24 -> 1/190 Monday 18:00 -> 1/5 Saturday xx:xx -> 1/1 Monday 08:17 -> 0/1 Monday 08:18 - Monday 08:23 -> 1/380
Shortest code win but golfing languages get a *3 multiplier.
(note to self: add more)
Edit: I've lowered the modifier, but I will not remove it. Some languages have some overhead like variable declaration and other long keywords;
return, etc. I don't want to discourage someone from writing the skeleton of a method in their chosen language because it's longer than a complete CJam answer.