How many 4 -digit positive integers have 2 or more zeroes?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There are 2 cases, when you have 2 zeroes, and when you have 3 zeroes:
Number of possibilities for having 3 zeroes is 9 (because there are 9 possibilities for the thousands digit. Number of possibilities for having 2 zeroes is 9 × 9 × 3 = 2 4 3 because we have 9 choices for the thousands digit (1-9), then 9 ways for the other non-zero digit, and finally 3 places (hundreds, tens, ones) where the non-zero digit can exist. Therefore our answer is 2 4 3 + 9 = 2 5 2
But 2002, for example, appears twice in your choices???
I got the right answer, but had to assume that 1000 is the smallest 4 digit number Ed Gray.
The number can only have 2 or 3 zeroes.
Case 1: Two Zeroes
Neither zero can be the first digit, so of the last three, the number of ways of placing the two zeroes is 3 C 2 = 3
Number of ways of picking the last two digits is 9 ∗ 9 = 8 1
Total number of 4 − digit numbers with 2 zeroes is 8 1 ∗ 3 = 2 4 3
Case 2: Three Zeroes
All three zeroes can't be the first digit.
There are 9 ways to choose the first digit.
Total number of 4 − digit numbers with 2 or 3 zeroes is therefore 2 4 3 + 9 = 2 5 2
HERE IS C++ PROGRM FOR THIS SOLUTION
using namespace std; int Zeros(int n) { int c=0,r=0; while(n!=0) { r=n%10; n=n/10; if (r==0)c++; } return c; } main() { int t,x=0; for(t=1000;t<=9999;t++) if(Zeros(t)>=2) x++; cout<<"NUmber having 2 or More Zeros "<<x; getch(); }
Let, abcd are 4-digit positive integer. For abcd have 2 zeros : 1. For c,d = 0 There are 9 possible digits (1,2,3,4,5,6,7,8,9) for a and b, so there are 9×9 = 81 solutions. 2. For b,c = 0 There are 9 possible digits (1,2,3,4,5,6,7,8,9) for a and d, so there are 9×9 = 81 solutions. 3. For b,d = 0 There are 9 possible digits (1,2,3,4,5,6,7,8,9) for a and c, so there are 9×9 = 81 solutions. For abcd have 3 zeros : It's obvious that b,c,d = 0 and there are 9 possible digits for a (1,2,3,4,5,6,7,8,9), so there are 9 solutions. So, the number of 4-digit positive integer have 2 or more zeros are 81 + 81 + 81 + 9 = 252.
I guess this might be a better solution. Calculate total number of 4 digit numbers possible which comes to 9000. Now calculate the number of digits with 1 zero which is 3(9^3)=2187. Now calculate number of digits with no zero that is (9^4)=6561. Add both and subtract from 9000, that is 9000-(6561+2187)=252.
Log in to reply
Total number with one digit: 9+1=10, two digits: 99+1=100, three digits: 999+1=1000, four digits:9999+1= 10000
Log in to reply
That is incorrect. Total number of numbers having two digits are not 100 but 90. You are counting 1-10 in the list of 3 digit numbers.
Say our number is a b c d . Obviously, a cannot be 0 . So we will do casework on b c d .
We must choose 2 of b , c , d to be 0 . ( 2 3 ) = 3 . Then, we must choose a number 0 through 9 to be the remaining number. ( 1 1 0 ) = 1 0 . Thus, there are 3 0 possible options. However, we have counted the case b c d = 0 0 0 3 times, so we subtract 2 . Thus, there are 2 8 possibilities for b c d .
Then, we must choose a number 1 through 9 for a . Thus, the answer is 9 ⋅ 2 8 = 2 5 2 .
for 2 zeroes: placing the zeroes will be: C ( 3 , 2 ) . for the remaining digit: 9 ∗ 9 ⇒ 3 ∗ 9 ∗ 9 = 2 4 3
for 3 zeroes: it must be in the form of _000 ⇒ 9
thus, the total is: 2 4 3 + 9 = 2 5 2
For Number=1000 to 9999
Number$=str$(Number)
For i=1 to 4
NumberOfZeroes=NumberOfZeroes+(mid$(Number$,i,1)="0")
Next i
Count=Count+(NumberOfZeroes>=2):NumberOfZeroes=0
Next Number
print Count
Result: 252
Let's think about this problem in simple terms and first figure out how many numbers have at least one zero.
The total possible 4 -digit positive integers we can form are 9 ∗ 1 0 ∗ 1 0 ∗ 1 0 = 9 , 0 0 0 since our first digit may be any of the integers 1 through 9 and our succeeding digits may be any of the integers from 0 through 9 . The number of 4-digit positive integers we can form with no zeros is 9 ∗ 9 ∗ 9 ∗ 9 (now our last 3 -digits exclude zero so we only have 9 digits for each slot remaining slot after the first slot). Thus our 4 -digit positive integers with at least one zero is equal to:
9 , 0 0 0 − 6 , 5 6 1 = 2 , 4 3 9
But we want to know how many have at least two zeros. So we can subtract from the 2 , 4 3 9 digits with at least one zero the number of 4 -digit numbers with exactly one zero. This can be found by fixing zero in each position (units, tens, hundreds) and adding each resulting permutation. Thus we have three permutations we want to add together 9 ∗ 1 ∗ 9 ∗ 9 + 9 ∗ 9 ∗ 1 ∗ 9 + 9 ∗ 9 ∗ 9 ∗ 1 = 2 , 1 8 7 (a more compact way to write this is 9 3 ∗ 3 ).
All we do now is subtract the number of positive 4 -digit integers with exactly one zero from the number of positive 4 -digit integers with at least one zero. This gives our solution
2 , 4 3 9 − 2 , 1 8 7 = 2 5 2
Case 1: Two zeroes
The number would take the form x 0 0 y , x 0 y 0 , x y 0 0 .
Put 1 to 9 into x and y (x and y can be the same), we get total 9 2 × 3 = 2 4 3 numbers
Case 2: Three zeroes
The number would have the form x 0 0 0 , therefore there are 9 more numbers.
Conclusion : There are total 2 4 3 + 9 = 2 5 2 number
the problem can be simply solved by observation. we can observe that totally there are nine 4-digit numbers with 3 zeros (1000, 2000,3000.....;9000) then with 2 digit zeroes:( 1001,1010,1100, 1002,1020,1200........9009,9090,9900..) total (3 9) 9=243 numbers.... ) hence clearly the answer is 243 +9=252.. :)
_ _ _ _ , so we have 4 digits .. lets count all the 4 digit numbers with 2 zeroes : Digit 1 : we can have 9C1 possibilities Digit 2/3/4: we want to count only numbers with two zeroes , so we choose 2 blanks out of 3 i.e 3C2 and 9C1 for the remaining digit . so total no of numbers with 2 zeroes = 9C1 3C2 9C1=27*9
4 digit numbers with 3 zeroes is easy : 9 possibilities . so adding both , 27 9 +9=28 9=252 hence the answer is 252.
Its question of finite probability. So find total 4-digit positive integers (with repetition) = 9x10x10x10=9000 Now 4-digit no. without any zero=9x9x9x9=9^4=6561 Now 4-digit no. with at least one zero= 3x(9x9x9x1)=2187
So (4-digit no. with two or more zeros) = (Total 4-digit no.)-(4-digit no. without zero)-(4-digit no. with one zero) =9000-6561-2187 =252
Calculate total number of 4 digit numbers possible which comes to 9000. Now calculate the number of digits with 1 zero which is 3(9^3)=2187. Now calculate number of digits with no zero that is (9^4)=6561. Add both and subtract from 9000, that is 9000-(6561+2187)=252.
So 9999 isn't possible, why?
Everybody that has posted an answer to this question has assumed that leading zeros are not considered, but the photo of a digital timer implies this is a wrong assumption.
wat😐😐😐😐😐😐😐😐😐
I dont no da aswer
Problem Loading...
Note Loading...
Set Loading...
The total number of 4 -digit positive integers, N = 9 × 1 0 × 1 0 × 1 0 = 9 0 0 0 .
The number of them without zero, N 0 = 9 × 9 × 9 × 9 = 6 5 6 1 .
The number of them with only one zero, N 1 = 9 × 1 × 9 × 9 + 9 × 9 × 1 × 9 + 9 × 9 × 9 × 1 = 2 1 8 7
Therefore, the number of 4 -digit positive integers with 2 or more zeroes, N 2 = N − N 0 − N 1 = 9 0 0 0 − 6 5 6 1 − 2 1 8 7 = 2 5 2 .