204. Count Primes
给定一个整数 n,返回严格小于 n 的素数的个数。
Ex
Example 1:
Input: n = 10
Output: 4
Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7.
Example 2:
Input: n = 0
Output: 0
...
198. House Robber
你是一名职业强盗,计划沿街抢劫房屋。
每个房子都藏有一定数量的钱,阻止你抢劫每个房子的唯一限制是相邻的房子有连接的安全系统,如果两个相邻的房子在同一晚被闯入,它会自动联系警察。
给定一个整数数组 nums,代表每个房子的金额,返回今晚在不报警的情况下可以抢劫的最大金额。
EX
Example 1:
Input: nums = [1,2,3,1]...
179. Largest Number
Given a list of non-negative integers nums, arrange them such that they form the largest number and return it.
Since the result may be very large, so you need to return a stri...