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

📅  最后修改于: 2021-06-30 01:15:15             🧑  作者: Mango

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

(A) 0.259
(B) 0.459
[C) 0.325
(D) 0.225答案: (A)
解释:

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

这个问题的测验