摘要: 原题 Description: Count the number of prime numbers less than a non-negative number, n. 求小于n(非负数)的所有质数(素数)。 思路 埃拉托色尼筛选法——用于求一定范围内的质数(效率高,推荐) 详戳这里百度or维基 阅读全文
posted @ 2017-05-02 14:11 小丑进场 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 原题 Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Her 阅读全文
posted @ 2017-05-02 09:05 小丑进场 阅读(256) 评论(0) 推荐(1) 编辑