# In how many ways can a lock be opened if that lock has three digit number lock if i) the last digit is 9ii) and sum of the first two digits is less than or equal to the last digit.numbers are from 0-9

This question is related to Accenture Interview

• Aug 23rd, 2005

our number is xy9
now if x is 0 then y has 10 options
now if x is 1 then y has 9 options (except 9)
now if x is 2 then y has 8 options (except 9 and 8)

now if x is 9 then y has 1 option (that is 0)

so the answer is 1 + 2 + ... + 10 = 55

#### suresh

• May 30th, 2005

55

#### Mubeen

• Jul 2nd, 2005

Can u please work this out as i am thinking the answer is 65.
Since 1st digit = 0-5
2nd digit = 0-5

#### Mubeen

• Jul 2nd, 2005

Can u please work this one out as i am thinking the answer is 65. Since
1st digit = 0-5
2nd digit = 0-5
3rd digit = 9 always
So considering all the combinations u still have two 5's that can combine with every other number except each other so u have missed those 10 combinations.

#### kavita kanyal

• Jul 7th, 2005

Ans : 55

#### Soumya

• Jul 25th, 2005

Since the last digit is 9... the sum of the first two digits shud not exceed 9...
so the possible combinations are only:
0-9,
1-8,
2-7,
3-6,
4-5,
5-4,
6-3,
7-2,
8-1,
9-0.
So, totally 10...

#### oktay

• Aug 23rd, 2005

our number is xy9
now if x is 0 then y has 10 options
now if x is 1 then y has 9 options (except 9)
now if x is 2 then y has 8 options (except 9 and 8)

now if x is 9 then y has 1 option (that is 0)

so the answer is 1 + 2 + ... + 10 = 55

#### vikram_g32 Profile Answers by vikram_g32

• Dec 21st, 2005

if x bcmes 0 then the number will be 2-digit and not 3-digit(in the question it is mentioned that the lock is a combinayion of three digit number)

#### gaurav

• Dec 30th, 2005

ans will be 55 as the combination with 5 & 5 of first & second digit will lead to sum up of 10 which is greater than 9

#### pavitra

• Jan 8th, 2006

it will not go upto 101+2+3+...........................+9 = 45 (ANSWER)

#### Vivek S

• Jan 12th, 2006

#### dhanasree

• Feb 8th, 2006

from the data --9

the two numbers are choosen such that their sum should not exceed 9

te posibilities are

if one number is 0 there are 9 ways of filling other number such that sum does not exceed 9

thyey are 0,1,2,3,4,5,6,7,8,9

similarly if one number is 1 then 9 chances and so on

so total number of ways=10+9+8+...+1=55

#### Vinay Karalkar

• Feb 23rd, 2006

ANS= 55 ways

Bcoz

0 can combine with 0 to 9 digits to satisfy both conditions in 10 ways

1 can combine with 0 to 8 digits to satisfy both conditions in 9 ways

if try for 2 to 9 same thing then

No. Of ways =10+9+8+....+1=(10*(10+1))/2=55

Think on it

#### jitusonawane Profile Answers by jitusonawane Questions by jitusonawane

• Mar 27th, 2006

55 ways

009,019,029,039,049,059,069,079,089,099,109,209,309,409,509,609,709,

809,909,119,129,139,149,159,169,179,189,219,229,239,249,259,269,279,

319,329,339,349,359,369,419,429,439,449,459,519,529,539,549,619,629,639,

719,729,819,

#### vidhya

• Apr 8th, 2006

1. 100First Digit can be 0-9 --> 10 waysSecond digit can be 0-9 --> 10waysLast digit 9 --> One wayIt is -> 10*10*1 = 100 ways

#### Riya

• Sep 13th, 2006

81

#### vamc

• Oct 22nd, 2006

ans is 55

#### balaganesh k

• Nov 10th, 2006

0+0 1+0   2+0     3+0     4+0      5+0    6+0     7+0     8+0   9+0
1      1    1 1 1 1 1 1 1
2   2 2 2 2 2 2 2
3   3 3 3 3 3 3
4   4 4 4 4 4
5   5 5 5 5
6   6 6 6
7   7 7
8   8
9

This is variou combination, for the first two key add together 55

#### bnreddy

• Jan 30th, 2007

the answer is 45.because in the number,first digit fill starts with 1and second digit in between 0-8 only=9 first digit fills start with 2 and second digit in between 0-7 only=8 as it is . .......................3.....................................................0-6..........=7.....................................................................................4....................................................0-5...........=6 5...................................................0-4.............=5 6 0-3.............=4 7 ...........................................0-2............=3 8...................................................0-1.............=2 9...................................................0...............=1total=9+8+7+6+5+4+3+2+1=45 ANSWER.HERE NEVER FORGET THE RULES THAT ARE THREE DIGIT NUMBER SO IT NEVER STARTS WITH ZERO. AND THE NUMBER IS LESS THAN OR EQUAL TO 9.

#### Ashish taunk

• Apr 1st, 2007

ans: 55
see we have the sum of 1st two digits is not more than 9;
so for 1st digit is 0,there are 10 combinations of two digit no(i.e. 00,01,02,03,....,09);
for 1st digit is 1,there are 9 combinations of two digit no(i.e. 10,11,12,13,....,18);
for 1st digit is 2,there are 8 combinations of two digit no(i.e. 20,21,22,,....,27);
for 1st digit is 3,there are 7 combinations of two digit no(i.e. 30,31,32,33,....,36);
.
.
.
.
for 1st digit is 7,there are 3 combinations of two digit no(i.e. 70,71,72);
for 1st digit is 8,there are 2 combinations of two digit no(i.e. 80,81);
for 1st digit is 9,there is only 1 combination of two digit no(i.e. 90);

so totoal no of combinations we have = 10+9+8+.....+3+2+1 = 10 (10 + 1) / 2 = 55

#### gurjot

• Apr 4th, 2007

look ppl the question says that the sum of first two digits should not exceed 9..
therefore if the first digit is:
0 the possible combinations will be 0,1,2,3,4,5,6,7,8,9....therefore the number of combinations is 10
1 the possible combinations are 0,1,2,3,4,5,6,7,8.. therefore  9
2................8
3................7
4................6
5................5
6.................4
7.................3
8.................2
9..................1

that makes a total of 55 combinations.. so there are 55 possible combinations..

#### Harish A

• Apr 18th, 2007

#### kishore vemuri

• Jun 26th, 2007

see there
if 1'st is 0 - 10 chances for the second
1 -  9
2 -  8
3 -  7
................
we will have (10+9+8+7+6+5+4+3+2+1)=55

#### amish021 Profile Answers by amish021

• Jul 10th, 2007

The lock can be opened in only 1 way, depending upon the code that was used while locking it

#### pavan kumar karasala

• Jul 24th, 2007

first two digits sum must be less than or equal.........
0-9
1-8
2-7
.
.
.
.
9-0 these are the digits that are ar equal to 9 =10 digits
and what abt which are leass than 9

similarly their total must be equal to 8,7,6,5,4,3,2,1,0.........
so for total of 9 we have 10 digits.......
for total of 8 we have 9 digits..
8,7,6,5,4,3,2,1...........so the total is 55.

#### karan

• Jul 24th, 2007

I feel the answer should be 1 .

as every lock can be opend by only one combination that sets it free!

This is my tought please reply if you agree ! i feel the other stats are simply to misguide.

#### bonthala narsimha reddy

• Jul 28th, 2007

because
number is 3 digit number.
so in first digit can fill up with only 1 to 9.
due to second rule , 2nd  digit fill up with only 0 to 8. because 2nd one is less than or equal to 9 only.
so like
series is
109
119
.
.
.
.
189
.
209
.
289
.
909.

• Aug 10th, 2007

Since the last digit is 9 there are only 55 ways in which the first two digits can be placed.

#### uma

• Aug 15th, 2007

Let the No. be xy9.
x cannot be 0, because the no will become 2 digit no. x can be from 1-9.
y can be anything between 0-9.
and x+y=9.
so the possibilities are

189
279
369
459
549
639
729
819
909

so the total no of ways are 9.

#### Preethi

• Aug 17th, 2007

Ans is 45
9+8+........0

#### shrisha89 Profile Answers by shrisha89

• Feb 10th, 2010

If both combinations are combined answer is 45.

#### pravesh28 Profile Answers by pravesh28 Questions by pravesh28

• Mar 27th, 2010

55

ans 10*9/2
eqal55

#### G.Yamini Devi Profile Answers by G.Yamini Devi

• Jul 1st, 2010

There are 8 ways for the first digit and 9 ways for the second digit.

therfore 8*9=72.

#### raulharish Profile Answers by raulharish

• Feb 24th, 2011

009 109 209 309 409 509 609 709 809 909   |
019 119 219 319 419 519 619 719 819          |
029 129 229 329 429 529 629 729                 |
039 139 239 339 439 539 639                        |
049 149 249 349 449 549                               |
059 159 259 359 459                                      |
069 169 269 369                                             |
079 179 279                                                    |
089 189                                                           |
099                                                                  |                    total= 55 ways

#### vinoth kumar

• Dec 14th, 2011

Answer is ii) and sum of the first two digits is less than or equal to the last digit.

numbers are from 0-9

#### sakshi

• Sep 9th, 2017

The digits might repeat.

#### Azharuddin Khan

• Oct 29th, 2017

As last digit is fixed as 9. so there are only 2 digits which we can set according to first possibility.
Now according to second possibility sum of both remaining digits should not be greater than 9, so
If we put 0 at first place then we can place 10 digits from 0 to 9 at second position, so 10 possibilities.
If we put 1 at first place then we can put 9 digits 0-8 at second place, so 9 possibilities at second position.and so on.
so possible ways are 10+9+8+7+6+5+4+3+2+1=55.  