a121. 質數又來囉
Tags : 區間問題 質數
Accepted rate : 8031人/10954人 ( 73% ) [非即時]
評分方式:
Tolerant

最近更新 : 2011-05-06 18:43

Content
你的好朋友質數先生又來找你囉,給你兩個數字,請算出這兩個數字包含的範圍內有幾個質數。
Input

輸入兩個正整數a,b(1<=a<=b<=100000000)。

 保證b-a<=1000 

Output
輸出一個非負整數,代表a到b之間(包含a,b)總共有幾個質數。
Sample Input #1
3 7
6 6
30 50
Sample Output #1
3
0
5
測資資訊:
記憶體限制: 512 MB
公開 測資點#0 (100%): 3.0s , <1M
Hint :
Tags:
區間問題 質數
出處:
[管理者: VacationClub (雄中公假社) ]

Status Forum 排行

ID User Problem Subject Hit Post Date
41297 suyueh (suyueh) a121
python
864 2024-07-16 15:42
44211 lai.sz.jen@g ... (軟體系賴思任) a121
WA (line:516)
146 2024-11-12 21:33
42320 spark960513@ ... (Sparkkk_) a121 300 2024-09-29 13:36
41469 ygong076@gma ... (呆子) a121
python的神奇解法
464 2024-07-29 22:56
41136 lbm00138 (bits/stdc++.h) a121
測資也太多
522 2024-07-06 23:48