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 | 642 Views, 20421 Search Bots | 49 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 642 Views, 20421 Search Bots | 49 Words
| Browse | Archive
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 | 642 Views, 20421 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
Related Articles
- Daily Interview Problem: Reverse Words in a String
- Algorithm Interview: Maximum Path Sum in Binary Tree
- Daily Interview Question: Longest Sequence with Two Unique Numbers
- YES!!
- Algorithm Interview: Shifted String
- Daily Interview Problem: Circle of Chained Words
- Daily Interview Problem: Trapping Rainwater
- Daily Interview Puzzle: Ways to Traverse a Grid
- Algorithm Interview: Permutations of numbers
- Daily Interview Question: Word Search
©2006~2024 SteakOverCooked - 0.00874 Seconds(s) - 2096.432 KB/s - 20 Online Memory: 491.63 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" />
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Comments (0)
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !