摘要: Problem: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5 阅读全文
posted @ 2016-11-05 11:57 SillyVicky 阅读(165) 评论(0) 推荐(0)
摘要: Problem: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, th 阅读全文
posted @ 2016-11-05 08:59 SillyVicky 阅读(115) 评论(0) 推荐(0)
摘要: Problem: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways c 阅读全文
posted @ 2016-11-05 07:49 SillyVicky 阅读(126) 评论(0) 推荐(0)