zoukankan      html  css  js  c++  java
  • hoj 大区间求质数个数 Count prime 线性筛素数

    题目来源:http://acm.hit.edu.cn/hoj/problem/view?id=2276

    Count prime

    My Tags   (Edit)
      Source : SCU Programming Contest 2006 Final
      Time limit : 1 sec   Memory limit : 64 M

    Submitted : 741, Accepted : 177

    Given an integer interval [L, R](L <= R <= 2147483647, R - L <= 1000000), please calculate the number of prime(s) in the interval.

    Input

    Multiple cases.
    There is one line in each case, which contains two integer: L, R.

    Output

    There is only one line for each case, which contains the number of prime(s) in the interval.

    Sample Input
    2 11
    Sample Output
    5
  • 相关阅读:
    python进阶-lambda和列表生成器
    【pandas】条件查询 分组标记
    【Python】生成html文档-使用dominate
    Python对列表内部的字典进行排序 --lambda,sort
    【python3】通过hashlib 和base64 对字符串进行加密
    【Pandas】统计某个值的出现次数
    git 创建分支,切换分支,merge操作
    如何将excel单元格中一部分数据提取到另一单元格?
    整型数的溢出解决办法
    CentOS6.9安装SonarQube7.6
  • 原文地址:https://www.cnblogs.com/zn505119020/p/3604857.html
Copyright © 2011-2022 走看看