摘要:
题目: Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we 阅读全文
摘要:
题目: Count the number of prime numbers less than a non-negative number, n. Example: 分析: 统计所有小于非负整数 n 的质数的数量。 这里使用埃拉托斯特尼筛法。要得到自然数n以内的全部素数,必须把不大于√n的所有素数的 阅读全文