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. For example, 6, …
Given a non-negative integer number, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + …
Convert a non-negative integer to its English words representation. Given input is guaranteed to be less than 231 – 1. For example, 123 – “One Hundred Twenty Three” 12345 …
If you want to solve the following puzzle then it may be not so easy/intuitive at a glance. It is a square and 20 is the area with e.g. …
We all know what rubik cubes. For example, here is a 2×2 rubik cubes and here is a 3×3 rubik cubes. The number of squares of a side for …