File: root - text - article - 2019 - 12 - -angles-of-a-clock.txt.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 375 Views, 17085 Search Bots | 49 Words
| Browse | Archive
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 375 Views, 17085 Search Bots | 49 Words
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Hi, here's your problem today. This problem was recently asked by Microsoft:
Given a time in the format of hour and minute, calculate the angle of the hour and minute hand on a clock.
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 375 Views, 17085 Search Bots | 49 Words Given a time in the format of hour and minute, calculate the angle of the hour and minute hand on a clock.
def calcAngle(h, m):
# Fill this in.
print calcAngle(3, 30)
# 75
print calcAngle(12, 30)
# 165
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Related Articles
- Algorithm Interview Question: Nth Fibonacci Number
- [Daily Problem] Move Zeros
- Plus One
- [Daily Problem] Remove k-th Last Element From Linked List
- Daily Interview Question: Longest Sequence with Two Unique Numbers
- Reverse a Linked List
- Spreadsheet Columns
- Daily Interview Question: Create a Simple Calculator
- Floor and Ceiling of a Binary Search Tree
- Non-decreasing Array with Single Modification
©2006~2024 SteakOverCooked - 0.0185 Seconds(s) - 1018.54 KB/s - 34 Online
Memory: 492.27 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">
![](/images/top.jpg)
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !