Last visit was: 28 Apr 2026, 20:43 It is currently 28 Apr 2026, 20:43
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
Events & Promotions
avatar
TarunKumar1234
Joined: 14 Jul 2020
Last visit: 28 Feb 2024
Posts: 1,102
Own Kudos:
Given Kudos: 351
Location: India
Posts: 1,102
Kudos: 1,358
Kudos
Add Kudos
Bookmarks
Bookmark this Post
avatar
eldorado12
Joined: 08 Jan 2020
Last visit: 28 Jun 2022
Posts: 16
Own Kudos:
Given Kudos: 24
Location: India
GMAT 1: 730 Q50 V38
GPA: 3.95
Kudos
Add Kudos
Bookmarks
Bookmark this Post
User avatar
kush09
Joined: 01 May 2019
Last visit: 25 Aug 2024
Posts: 144
Own Kudos:
Given Kudos: 27
Location: India
Concentration: General Management, Technology
GMAT 1: 660 Q49 V31
GPA: 3.5
WE:Information Technology (Finance: Investment Banking)
Products:
GMAT 1: 660 Q49 V31
Posts: 144
Kudos: 159
Kudos
Add Kudos
Bookmarks
Bookmark this Post
User avatar
GMATmronevsall
Joined: 04 Jan 2019
Last visit: 08 Jan 2023
Posts: 33
Own Kudos:
Given Kudos: 52
Posts: 33
Kudos: 41
Kudos
Add Kudos
Bookmarks
Bookmark this Post
IMO A

Combinations are
(10!*9!*10!*!10!*10!) -> there can be 5 such combinations so (10!*9!*10!*!10!*10!)*5
Now as this number is multipied by 5 the only possible values at units place can be 0 or 5
Hence A
User avatar
DHRJ0032
Joined: 27 Feb 2020
Last visit: 20 Dec 2023
Posts: 101
Own Kudos:
Given Kudos: 124
Location: India
Concentration: Finance, Operations
GPA: 4
WE:Operations (Aerospace and Defense)
Posts: 101
Kudos: 107
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Total possible cases=

10x10x10x10x10=10⁵

(0 is also allowed at first place in case of passwords)

Now we have to calculate the cases in which 5 is followed by 9 immediately.

Assume (9,5) as one entity..
So total 4 places has to be filled with 10 digits from 0 to 9..

(9,5) can be places at any of the 4 places in 4C1 ways..
And the rest three can be filled in 10 ways each..so total such cases will be.

4C1x10x10x10=4000

Required number of cases will be 100x10³-4x10³=96x10³

ANS:A

Posted from my mobile device
avatar
dep
Joined: 23 Feb 2018
Last visit: 07 Aug 2021
Posts: 82
Own Kudos:
Given Kudos: 23
Posts: 82
Kudos: 119
Kudos
Add Kudos
Bookmarks
Bookmark this Post
The no of codes possible = total no of combinations- no of combinations when 5 is followed by 9
Total no of combinations = 10*10*10*10*10= 10^5
5 followed by 9 = taking 5&9 as one block
Hence now _ _ _ _ can be arranged in 4* 10*10*10= 4000

Hence total when 9 doesn’t follow 5 ==
100000 - 4000
96000

IMO A

Posted from my mobile device
User avatar
debjit1990
Joined: 26 Dec 2017
Last visit: 26 Apr 2026
Posts: 256
Own Kudos:
Given Kudos: 22
Location: India
GMAT 1: 580 Q42 V27
Products:
GMAT 1: 580 Q42 V27
Posts: 256
Kudos: 285
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Total no of codes that can be made=10^5
total 5 spaces are there
let, 59 occupies the first two places..so other three places can be filled with 10^3
now this 59 can occupy a total of 4 places
so with 59 the total no of codes=4*10^3
withoud 59 following=10^5-(4*10^3)=96000
ans :A
User avatar
Saupayan
Joined: 30 May 2013
Last visit: 23 May 2025
Posts: 107
Own Kudos:
Given Kudos: 94
Status:Full-time employee
Affiliations: Apple Inc
Location: United States
Saupayan: Mazumdar
Concentration: Economics, Leadership
GMAT 1: 760 Q51 V41
GRE 1: Q170 V160
GPA: 3.89
WE:Engineering (Computer Hardware)
GMAT 1: 760 Q51 V41
GRE 1: Q170 V160
Posts: 107
Kudos: 139
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?

Total possibilities (without any constraints) = 10x10x10x10x10

Number of ways 59 can come together and in that order
5 9 _ _ _
_ 5 9 _ _
_ _ 5 9 _
_ _ _ 5 9
Thus, 4 ways
In each case, each of the other 3 spots can be filled in 10*10*10 ways
Thus 4000 total cases

We need to remove these cases from the total number of cases to get our answer

=> answer = 10^5 - 4*10^3 = 96000
Answer: A

Posted from my mobile device
avatar
suchita2409
Joined: 11 May 2019
Last visit: 22 Jun 2021
Posts: 165
Own Kudos:
Given Kudos: 296
Posts: 165
Kudos: 125
Kudos
Add Kudos
Bookmarks
Bookmark this Post
IMO A

5----
-5---
--5--
---5-
----5

5 can take this places and not followed by 9.
5's position is fixed.
Next blank can take any of (012345678)values so 9!
other blanks can take 10!
10!×9!×10!×10!×5
We multiply by 5 because of 5 different placements of 5
So answer should be multiple of 5
Only A is.

Posted from my mobile device
User avatar
meetnikhil
Joined: 11 Jun 2011
Last visit: 14 Oct 2023
Posts: 19
Own Kudos:
Given Kudos: 195
Posts: 19
Kudos: 27
Kudos
Add Kudos
Bookmarks
Bookmark this Post
total combinations - 10^5
with condition - 5 at 10^5 place 9 at 10^4 place - so 1000 numbers like these
likewise keep on rolling 5 and 9 position -- total 4000 numbers - 10^5 - 4000 so 96000
User avatar
ishita27
Joined: 31 Jul 2020
Last visit: 03 Jul 2021
Posts: 64
Own Kudos:
Given Kudos: 143
Location: India
GMAT 1: 660 Q49 V31
GPA: 3.87
GMAT 1: 660 Q49 V31
Posts: 64
Kudos: 141
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Total no. of codes possible will be 10*10*10*10*10 = 10^5

Cases in which 5 will be followed by 9,
5-9-x-x-x --> 1*1*10*10*10
x-5-9-x-x --> 10*1*1*10*10
x-x-5-9-x --> 10*10*1*1*10
x-x-x-5-9 --> 10*10*10*1*1

So total no. of such cases will be (10*10*10) * 4 = 4000

But there will be 3 cases in which "5-9" will repeat in a code
5-9-5-9-x
x-5-9-5-9
5-9-x-5-9
These cases are counted twice in the above , so we will subtract these 3 cases from 4000

Hence total no. of ways = 10^5 - 3997 = 96003

Correct answer is D

Posted from my mobile device
User avatar
Jks3000
Joined: 28 Mar 2018
Last visit: 12 Nov 2025
Posts: 168
Own Kudos:
Given Kudos: 63
Location: India
Concentration: Strategy, Technology
GMAT 1: 700 Q49 V36
GMAT 2: 730 Q50 V39
Products:
GMAT 2: 730 Q50 V39
Posts: 168
Kudos: 77
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Total number of cases (without any restriction) of code consists of five digits = 10*10*10*10*10 = 100000

Now,

cases in which digit 5 is immediately followed by the digit 9 are :

5 9 _ _ _
_ 5 9 _ _
_ _ 5 9 _
_ _ _ 5 9

In each of above cases, number of ways = 10*10*10

Therefore total ways in which digit 5 is immediately followed by the digit 9 = 4 * 10*10*10 = 4000


Therefore,

Total ways in which digit 5 is NOT immediately followed by the digit 9 = 100000 - 4000 = 96000


Hence, Correct answer is Option A.

Posted from my mobile device
avatar
Abhishekrao12
Joined: 30 Jun 2019
Last visit: 21 Feb 2024
Posts: 51
Own Kudos:
Given Kudos: 74
Location: India
Concentration: Operations, Finance
WE:Engineering (Manufacturing)
Posts: 51
Kudos: 66
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 5 slots _ _ _ _ _ needs to be filled with 10 digits.
Total no of possibilities is 10X10X10X10X10
5 must not be followed by 9.
5 9 _ _ _ : 10X10X10 = 1000 ways
_ 5 9 _ _ : 10X10X10 = 1000 ways
_ _ 5 9 _ : 10X10X10 = 1000 ways
_ _ _ 5 9 : 10X10X10 = 1000 ways
4000 ways in which 5 will be followed by 9.
Subtract this from the total no of ways. Option a will be the answer .
User avatar
raghav2512
Joined: 23 Apr 2017
Last visit: 15 Sep 2021
Posts: 29
Own Kudos:
Given Kudos: 103
GMAT 1: 620 Q45 V31
GPA: 3.8
Products:
GMAT 1: 620 Q45 V31
Posts: 29
Kudos: 89
Kudos
Add Kudos
Bookmarks
Bookmark this Post
We can find this by first finding the total number of 5 digit codes and then subtracting the codes in which 5 is immediately followed by 9.

Total 5 digit codes
= 10*10*10*10*10
= 100000

To find codes in which 9 follows immediately after 5->
We have 4 cases:
a) 5 is at 1st position and 9 at 2nd
5 9 _ _ _
We can have 10*10*10 codes which start in this way

b) 5 is at 2nd position
And 9 at 3rd
_ 5 9 _ _ _
Again other positions can be filled as 10*10*10

c) 5 is at 3rd position and 9 at 4th
_ _ 5 9 _
Total codes = 10*10*10

d) 5 is at 4th position
And 9 at 5th
_ _ _ 5 9
Total codes 10*10*10

We can total these cases to be 4*10*10*10
= 4000

Let's subtract from total cases->
100000-4000
= 96,000

IMO A

Posted from my mobile device
avatar
arshiji
Joined: 13 Feb 2019
Last visit: 12 Jan 2021
Posts: 25
Own Kudos:
Given Kudos: 17
Location: India
Concentration: Technology, Strategy
GMAT 1: 620 Q48 V27 (Online)
GPA: 3.76
WE:Information Technology (Consulting)
GMAT 1: 620 Q48 V27 (Online)
Posts: 25
Kudos: 46
Kudos
Add Kudos
Bookmarks
Bookmark this Post
The answer is D

Given that :
Code of 5 digits from 10 digits available ie.0 to 9

Condition:
5 not immediately followed by 9.

Total number of locks possible = 10×10×10×10×10 = 10^5

Posted from my mobile device
User avatar
Jasvinder
Joined: 30 Mar 2019
Last visit: 24 Apr 2025
Posts: 5
Own Kudos:
Given Kudos: 32
Location: India
Posts: 5
Kudos: 17
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Number of arrangements where 5 is not followed by 9 is =
Total arrangements - Number of arrangements where 9 and 5 are together

Total arrangements = 10^5 = 100000

Number of arrangements where 9 and 5 are together = 3999

Thus answer is 96001.

Posted from my mobile device
avatar
skg315
avatar
Current Student
Joined: 02 Jun 2020
Last visit: 26 Dec 2021
Posts: 10
Own Kudos:
Given Kudos: 68
Location: India
GMAT 1: 650 Q47 V33
GMAT 2: 690 Q48 V36
GPA: 3.7
GMAT 2: 690 Q48 V36
Posts: 10
Kudos: 26
Kudos
Add Kudos
Bookmarks
Bookmark this Post
for codes with 5 not followed immediately by 9 we will subtract codes with 5 followed by 9 from total possible codes.

total possible codes as repetition is allowed = 10^5

codes that have 5 immediately followed by 9 are
take 59 as one unit remaining 3 places have 10 options each so total case 4×10^3 but in this there are 3 cases that have been repeated i.e. 5959x,59x59,x5959
hence total cases are 4×10^3 - 3

so 10^5-(4×10^3 -3)= 96003

option D is correct

Posted from my mobile device
User avatar
SohGMAT2020
Joined: 04 May 2020
Last visit: 22 Nov 2025
Posts: 239
Own Kudos:
Given Kudos: 83
Location: Canada
Concentration: Finance, General Management
GMAT 1: 700 Q49 V35 (Online)
GPA: 3.42
Products:
GMAT 1: 700 Q49 V35 (Online)
Posts: 239
Kudos: 421
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

Solution:

Without any condition, the total cases are:

1st , 2nd, 3rd, 4th and 5th digits can each take 10 cases : so total 10,000 cases

now, lets look at the restriction

5 9_ _ _ : No of cases for this condition is 10 X 10 X 10 = 1000
but four such cases are possible : 5 9_ _ _, _ 5 9_ _ , _ _ 5 9_ , and _ _ _ 5 9

So subtract 4 * 1000 from 10,000 cases

Answer = 96,000

Option A is the correct answer

Posted from my mobile device
User avatar
Saasingh
User avatar
Current Student
Joined: 11 Apr 2020
Last visit: 06 Aug 2022
Posts: 386
Own Kudos:
Given Kudos: 820
Status:Working hard
Location: India
GPA: 3.93
WE:Information Technology (Computer Software)
Products:
Posts: 386
Kudos: 266
Kudos
Add Kudos
Bookmarks
Bookmark this Post
A?

Total for 5 numbers would be 100000 possible.

Numbers in which 5 is followed by 9 ie 59 occur together are 59xxx, x59xx, xx59x,xxx59 ie 4 possible . Also note x positions can be filled in 10 ways. ===> 4000 numbers.

Thus answer = 100000 - 4000 = 96000
User avatar
HoneyLemon
User avatar
Stern School Moderator
Joined: 26 May 2020
Last visit: 02 Oct 2023
Posts: 627
Own Kudos:
Given Kudos: 219
Status:Spirited
Concentration: General Management, Technology
WE:Analyst (Computer Software)
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Is it A

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 - restriction (combination 5 ,9 )
10^5 - 4 * 10^3 = 96000


A. 96,000
B. 96,001
C. 96,002
D. 96,003
E. 96,004
   1   2   3   4   
Moderator:
Math Expert
109950 posts