Last visit was: 19 Nov 2025, 16:00 It is currently 19 Nov 2025, 16:00
Close
GMAT Club Daily Prep
Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track
Your Progress

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History
Not interested in getting valuable practice questions and articles delivered to your email? No problem, unsubscribe here.
Close
Request Expert Reply
Confirm Cancel
User avatar
RajatJ79
Joined: 06 Oct 2019
Last visit: 03 Dec 2023
Posts: 134
Own Kudos:
Given Kudos: 242
Concentration: Strategy, Technology
WE:Marketing (Internet and New Media)
Posts: 134
Kudos: 204
Kudos
Add Kudos
Bookmarks
Bookmark this Post
User avatar
avinash07
Joined: 12 Mar 2017
Last visit: 25 Aug 2025
Posts: 16
Own Kudos:
Given Kudos: 64
Posts: 16
Kudos: 64
Kudos
Add Kudos
Bookmarks
Bookmark this Post
User avatar
anthien128
Joined: 09 Jan 2011
Last visit: 19 Jun 2021
Posts: 72
Own Kudos:
Given Kudos: 58
Location: Viet Nam
Concentration: Technology, Entrepreneurship
Posts: 72
Kudos: 104
Kudos
Add Kudos
Bookmarks
Bookmark this Post
User avatar
AntrikshR
Joined: 26 Jan 2019
Last visit: 17 Jul 2025
Posts: 125
Own Kudos:
Given Kudos: 333
Location: India
Concentration: Finance, Technology
GMAT 1: 590 Q47 V24
GMAT 2: 670 Q49 V33
GRE 1: Q169 V151
GMAT 2: 670 Q49 V33
GRE 1: Q169 V151
Posts: 125
Kudos: 204
Kudos
Add Kudos
Bookmarks
Bookmark this Post
_ _ _ _ _ --> each place can have any 10 digits (0-9) and they can be repeated.
=>Total codes = 10^5
Now we have to subtract those codes where 5 is followed by 9.
59_ _ _ --->10^3 codes
_59_ _ ----> 10^3 codes
_ _59_ ---> 10^3 codes
_ _ _59 ---> 10^3 codes

Note: In the above cases, we have already covered the 20 codes, in which we will see 2 sets of 59.
i.e. 5959_ -10 codes and _5959 - 10 codes
=> 10^5 - 4*10^3
=>96000 (A)
User avatar
ashwini2k6jha
Joined: 11 Jun 2014
Last visit: 27 Jan 2025
Posts: 93
Own Kudos:
Given Kudos: 48
Location: India
Schools: ISB '23
GMAT 1: 700 Q49 V37
Schools: ISB '23
GMAT 1: 700 Q49 V37
Posts: 93
Kudos: 98
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Answer:A
Let us consider all the cases in which 5 is followed by 9
Case I, 5 9 - - -
Total possible number of codes in this case= 1*1*10*10*10=1000
First two place filled above by only one digit
Case II, - 5 9 - -
Total possible number of codes in this case=10*1*1*10*10=1000
Case III,. - - 5 9 -
Total possible number of codes in this case=10*10*1*1*10=1000
Case IV,. - - - 5 9
Total possible number of codes in this case=10*10*10*1*1=1000
Hence combining all cases ,total number of codes in which 5 is followed by 9=4*1000
Also Total number of codes without any restriction=10*10*10*10*10=100000
Hence number of code when 5 is NOT followed by 9=Total number of codes without any restriction- Total number of codes in which 5 is followed by 9
=100,000-4*1000=96,000 Answer

Posted from my mobile device
User avatar
Varunsawhney8
Joined: 23 May 2020
Last visit: 27 Jan 2021
Posts: 229
Own Kudos:
Given Kudos: 46
Location: India
Posts: 229
Kudos: 237
Kudos
Add Kudos
Bookmarks
Bookmark this Post
A locker code consists of five digits, for example 04391, 23335, 05531... David wants to set his locker code so that digit 5 is not immediately followed by the digit 9. How many such codes are possible?


Total Number of Combinations= 10^5

Consider the case when 5 is followed by 9

XXX59- Case 1
XX59X- Case 2
X59XX- Case 3
59XXX- Case 4

Let X be any integer from 0 to 9

So Possibilities for each case mentioned above is 10*10*10*1*1=1000
Total cases where 5 is followed by 9 are 4000
but in case 1 and case 4 (59X59) will be common so we need to deduct this value from 4000= 4000-1=3999

Deducting this value from Total possibilities=100000-3999=96001
Answer: B


A. 96,000

B. 96,001

C. 96,002

D. 96,003

E. 96,004

Posted from my mobile device
User avatar
minustark
Joined: 14 Jul 2019
Last visit: 01 Apr 2021
Posts: 469
Own Kudos:
Given Kudos: 52
Status:Student
Location: United States
Concentration: Accounting, Finance
GMAT 1: 650 Q45 V35
GPA: 3.9
WE:Education (Accounting)
Products:
GMAT 1: 650 Q45 V35
Posts: 469
Kudos: 398
Kudos
Add Kudos
Bookmarks
Bookmark this Post
A locker code consists of five digits, for example 04391, 23335, 05531... David wants to set his locker code so that digit 5 is not immediately followed by the digit 9. How many such codes are possible?

A. 96,000
B. 96,001
C. 96,002
D. 96,003
E. 96,004

Total codes possible = 10^5 = 1,00,000
Codes with 5 followed by 9= 10^3* 4 (59 is fixed and other 3 digits can be organized in 10^3 ways, and these total 4 digits as 59 is acting like one digit can happen in 4 ways)= 4,000

Total required ways = 1,00,000 - 4,000 = 96,000

A is the answer.

Posted from my mobile device
User avatar
rsrighosh
Joined: 13 Jun 2019
Last visit: 11 Dec 2022
Posts: 188
Own Kudos:
Given Kudos: 645
GMAT 1: 490 Q42 V17
GMAT 2: 550 Q39 V27
GMAT 3: 630 Q49 V27
GMAT 3: 630 Q49 V27
Posts: 188
Kudos: 132
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Answer A

5 digit number :- _ _ _ _ _
There fore total set of numbers:- 10 x 10 x 10 x 10 x 10 = 100000

5 immediately followed by 9

59 _ _ _ = 10 x 10 x 10 = 1000
_ 59 _ _ = 10 x 10 x 10 = 1000
_ _ 59 _ = 10 x 10 x 10 = 1000
_ _ _ 59 = 10 x 10 x 10 = 1000

Therefore, Total = 4000

Hence, no. of numbers with digit 5 is not immediately followed by the digit 9

100000 - 4000 = 96000
User avatar
Marcost
Joined: 28 Feb 2020
Last visit: 25 Aug 2024
Posts: 29
Own Kudos:
Given Kudos: 118
Location: Peru
Concentration: Strategy, Leadership
GMAT 1: 650 Q47 V31
WE:Engineering (Other)
GMAT 1: 650 Q47 V31
Posts: 29
Kudos: 99
Kudos
Add Kudos
Bookmarks
Bookmark this Post
All possible combinations for locker code = 10^5

Combinations in which 5 is inmediatly followed by 9 = 3998

100, 000 - 3998 = 96,002.

Posted from my mobile device
avatar
fazleywali
Joined: 29 Jun 2020
Last visit: 03 Oct 2021
Posts: 4
Own Kudos:
Given Kudos: 18
Posts: 4
Kudos: 26
Kudos
Add Kudos
Bookmarks
Bookmark this Post
A locker code consists of five digits, for example 04391, 23335, 05531... David wants to set his locker code so that digit 5 is not immediately followed by the digit 9. How many such codes are possible?

A. 96,000
B. 96,001
C. 96,002
D. 96,003
E. 96,004

Since the locker contains 5 digits. The number of codes possible = 10^5= 100,000 codes.

But we are given that 5 cannot be followed by 9.
SO let's take that 95 are together then the number of codes possible is 10x10x10x4=4000. We have to multiply by 4 since 95 can take 4 different positions.

Therefore, the total number of codes possible = 100,000-4000= 96,000.

Hence A is the answer.
User avatar
Mizar18
Joined: 28 Jan 2019
Last visit: 23 Oct 2025
Posts: 177
Own Kudos:
266
 [1]
Given Kudos: 130
Location: Peru
Posts: 177
Kudos: 266
 [1]
1
Kudos
Add Kudos
Bookmarks
Bookmark this Post
We know that the locker code has 5 digits, so assuming that there are no restrictions we have that these are the possible combinations:

10 * 10 * 10 * 10 * 10 = 100000

Then we can assume that the number starts with 5 and 9, so we will have the following combinations

1(position of 5)*1 (position of 9)*10*10*10 = 1000…(2)

Then we can assume that the number have digit 5 and 9 at its 2nd and 3rd position, so we will have the following combinations

10*1(position of 5)*1(position of 9)*10*10* = 1000..(3)

Then we can assume that the number have digit 5 and 9 at its 3rd and 4th position, so we will have the following combinations

10*10*1(position of 5)*1(position of 9)*10* = 1000..(4)

Then we can assume that the number have digit 5 and 9 at its 4th and 5th position, so we will have the following combinations

10*10*10*1(position of 5)*1(position of 9)* = 1000..(5)

Finally

We can substract (2), (3), (4), and (5) from (1) to get the possible codes given the prompt restriction:


100000-1000-1000-1000-1000 = 96000

A) is the answer.

Posted from my mobile device
avatar
Anongmattaker
Joined: 11 Aug 2020
Last visit: 04 Jun 2021
Posts: 2
Own Kudos:
Given Kudos: 15
Posts: 2
Kudos: 1
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Answer: A
Total possible combinations: 10x10x10x10x10=100,000
Outcomes not allowed:
1. 95 _ _ _
Possible combinations: 10x10x10 = 1000
2. _ 95 _ _
Possible combinations: 10x10x10 = 1000
3. _ _95 _
Possible combinations: 10x10x10 = 1000
4._ _ _95
Possible combinations: 10x10x10 = 1000

Total possible combinations: 100,000 - 4,000 =96,000 (A)
User avatar
davidbenare
Joined: 08 Jul 2020
Last visit: 09 Oct 2020
Posts: 3
Own Kudos:
Given Kudos: 6
Location: Mexico
GPA: 3.84
WE:Consulting (Consulting)
Posts: 3
Kudos: 72
Kudos
Add Kudos
Bookmarks
Bookmark this Post
First we need to find the total number of arrengments without considering the constraint.

There are five digits and each digit can have 10 different numbers (0-9) therefore there are 100,000 possible codes.

Now lets consider those codes that cant fulfill the constraint. There are 4 different arrengements that dont fulfill the constraint:

9 5 X X X
X 9 5 X X
X X 9 5 X
X X X 9 5

Each of the X’s can have 10 different digits. Therefore each arrangement above could have 1000 different combinations. In total, 4000 different combinations that we must substract from the original 100,000.

THEREFORE THE CORRECT ANSWER IS A.

Posted from my mobile device
User avatar
EatMyDosa
Joined: 06 Jan 2017
Last visit: 01 Dec 2022
Posts: 85
Own Kudos:
Given Kudos: 283
Location: India
Concentration: General Management, Finance
GPA: 3.33
Products:
Posts: 85
Kudos: 114
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Constraints: Digit 5 is not immediately followed by digit 9

Now, using the given constraints, let’s see how many locker codes are possible in which 5 IS immediately followed by 9. Once we calculate the total number of all such locker codes, we will subtract it from total 5-digit locker code to get our answer i.e.

#codes (5 not immediately followed by 9) = # total 5-digit codes - #codes (5 IS immediately followed by 9) – (1)

Note that since we are talking about locker codes, even 0 can take the ten thousand’s place. Therefore,

Total 5-digits codes possible = 10*10*10*10*10 = 10^5

Scenarios (5 IS immediately followed by 9):

Case 1: 59xxx
Here each of the position ‘x’ can be filled with 10 digits. Therefore,

Total 59xxx cases = 10*10*10 = 1000

Note – These 1000 cases will also include these two sub-cases: 5959x and 59x59 ---- (i)



Case 2: x59xx
Here each of the position ‘x’ can be filled with 10 digits. Therefore,

Total x59xx cases = 10*10*10 = 1000

Note – These 1000 cases will also include: x5959 --- (ii)

Case 3: xx59x
Here each of the position ‘x’ can be filled with 10 digits. Therefore,

Total xx59x cases = 10*10*10 = 1000

Note – These 1000 cases will also include: 5959x --- (iii)

Case 4: xxx59
Here each of the position ‘x’ can be filled with 10 digits. Therefore,

Total xxx59 cases = 10*10*10 = 1000

Note – These 1000 cases will also include these two sub-cases: x5959 and 59x59 ----- (iv)


Observe the highlighted cases in (i), (ii), (iii), (iv), of the 6-sub-cases, three are same as other others. So, in total there are 3 sub-cases.

# codes (5 IS immediately followed by 9) = (1000 + 1000 + 1000 + 1000) – 3 sub-cases counted twice

= 4000 - 3


Therefore, from equation (1), we get,

#codes (5 not immediately followed by 9) = 100,000 – [4000 – 3]

= 96,003

Option D (correct)

Posted from my mobile device
User avatar
rajatchopra1994
Joined: 16 Feb 2015
Last visit: 22 Jun 2024
Posts: 1,056
Own Kudos:
Given Kudos: 30
Location: United States
Posts: 1,056
Kudos: 1,252
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Explanation:

Total possible locker code combination when there are not any condition: 10^5 = 100000

Digit 5 should be followed by digit 9 in code; so will take when digit 5 is followed by 9.
59xxx - as fixing 59 digit position; 10x10x10=1000 codes are possible
similarly will check others.

x59xx - 1000 codes
xx59x - 1000 codes
xxx59 - 1000 codes

But here some locker codes are counted twice like:
59_59 counted twice
5959_ counted twice
_5959 counted twice.

total possible combinations = 100000 - 4000 + 3
= 96003

IMO-D

Posted from my mobile device
User avatar
Mona2019
Joined: 13 Mar 2018
Last visit: 27 Sep 2022
Posts: 190
Own Kudos:
Given Kudos: 1,608
Posts: 190
Kudos: 218
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Number of possible combinations = 10^5
Combinations where 5 is the 1st digit and 9 is the second digit in the code - we have possible combinations as 10^3
59 together can take 4 different consecutive positions in the 5 digit code
So possible combinations becomes 4*10^3

So the required combinations are 10^5-4*10^3

Answer is A

Posted from my mobile device
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Quote:
A locker code consists of five digits, for example 04391, 23335, 05531... David wants to set his locker code so that digit 5 is not immediately followed by the digit 9. How many such codes are possible?

A. 96,000
B. 96,001
C. 96,002
D. 96,003
E. 96,004

The total possibility of such codes that digit 5 is not immediately followed by the digit 9 is the total possibility of five digits - the total possibility of such codes that digit 5 is immediately followed by the digit 9

the total possibility of five digits is {0-9} {0-9} {0-9} {0-9} {0-9} = 10 * 10 * 10 * 10 *10 = 100,000
the total possibility of such codes that digit 5 is immediately followed by the digit 9 is
Case 1: {5} {9} {0-9} {0-9} {0-9} = 1 * 1 * 10 * 10 * 10 = 1,000
Case 2: {0-9} {5} {9} {0-9} {0-9} = 10 * 1 * 1 * 10 * 10 = 1,000
Case 3: {0-9} {0-9} {5} {9} {0-9} = 10 * 10 * 1 * 1 * 10 = 1,000
Case 4: {0-9} {0-9} {0-9} {5} {9} = 10 * 10 * 10 * 1 * 1 = 1,000
There are duplicated values such as 5959_ , _5959, 59_59 (3 possible values)

So The total possibility of such codes that digit 5 is not immediately followed by the digit 9 = 100,000 - (4*1,000 -3) = 96,003
I choose D.

Posted from my mobile device
User avatar
ashimakumari
Joined: 24 Feb 2020
Last visit: 29 Jan 2023
Posts: 52
Own Kudos:
Given Kudos: 91
Location: India
Concentration: Leadership, General Management
Posts: 52
Kudos: 39
Kudos
Add Kudos
Bookmarks
Bookmark this Post
A locker code consists of five digits, for example 04391, 23335, 05531... David wants to set his locker code so that digit 5 is not immediately followed by the digit 9. How many such codes are possible?

A. 96,000
B. 96,001
C. 96,002
D. 96,003
E. 96,004

Total possible outcomes = 10^5

Code where 5 is immediately followed by 9. 59xxx.
Count for 59xxx : 1 x1 x 10 x 10 x 10 x 4 = 4000
4 represents any other position. If we have any other pair of 59 combination, it would already be counted in above explanation. IMO – A.

Posted from my mobile device
User avatar
Mck2023
Joined: 23 Feb 2020
Last visit: 09 Jun 2023
Posts: 131
Own Kudos:
Given Kudos: 297
Location: Nepal
GMAT 1: 650 Q44 V35
GMAT 1: 650 Q44 V35
Posts: 131
Kudos: 89
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Here,
Possible combinations for 5 digits code, from numbers 0 to 9, without constriants:
= 10^5 = 100000

Possible combinations for 5 digits code with 5 folloqed by 9:
= 4000

So the required pssibke combinations= 100000-4000
=96000

So the answer is A.

Posted from my mobile device
User avatar
NeoNguyen1989
Joined: 18 Nov 2018
Last visit: 19 Nov 2025
Posts: 83
Own Kudos:
Given Kudos: 42
Posts: 83
Kudos: 88
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Imo A
The # of combination that it can have = 10^5 options
The # of combination that fit the requirement = total # of combinations - # of combinations that have 9 followed direct 5
The # of combinations that have 9 following 5 is 4 x 10^3
Hence, the # of combination that fit the requirement = 10^5-4*10^3=96000

Posted from my mobile device
   1   2   3   4   
Moderator:
Math Expert
105390 posts