📜  门| GATE-CS-2014-(Set-2) |第 65 题

📅  最后修改于: 2021-09-26 03:21:33             🧑  作者: Mango

位于 1 到 100(包括两者)之间的给定正整数不能被 2、3 或 5 整除的概率是______。

(一) 0.259
(乙) 0.459
(C) 0.325
(D) 0.225答案:(一)
解释:

There are total 100 numbers, out of which 

50 numbers are divisible by 2, 
33 numbers are divisible by 3,
20 numbers are divisible by 5

Following are counted twice above
16 numbers are divisible by both 2 and 3
10 numbers are divisible by both 2 and 5
6 numbers are divisible by both 3 and 5

Following is counted thrice above
3 numbers are divisible by all 2, 3 and 5

所以可被 2、3 和 5 整除的总数是 =
= 50 + 33 + 20 – 16 – 10 – 6 + 3
= 103 – 29
= 74

所以数字是数字的概率不是
可被 2、3 和 5 整除 = (100 – 74)/100 = 0.26

这个问题的测验