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 | 382 Views, 17381 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 | 382 Views, 17381 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 | 382 Views, 17381 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
- Find the non-duplicate number
- Autorun.inf Virus Protection
- Daily Interview Problem: Largest BST in a Binary Tree
- Algorithm Interview Question: Find the Single Element in an Array of Duplicates
- Algorithm Interview: Lowest Common Ancestor of 2 Nodes in Binary Tree
- First and Last Indices of an Element in a Sorted Array
- Daily Interview Problem: Minimum Removals for Valid Parenthesis
- Kaprekar
- Fix Brackets
- [Daily Problem] Longest Palindromic Substring
©2006~2024 SteakOverCooked - 0.01377 Seconds(s) - 3792.408 KB/s - 35 Online
Memory: 529.29 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="noindex, 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 !