Any one explain please

This topic has expert replies
Senior | Next Rank: 100 Posts
Posts: 74
Joined: Sun Aug 02, 2009 9:10 pm
Thanked: 1 times
Followed by:1 members

Any one explain please

by navdeepbajwa » Wed Oct 21, 2009 6:16 pm
107. If operation $ is defined as
$X = X + 2 if X is even
$X = X - 1 if X is odd,
what is $(...$($($(15)))...) 99 times?

(A) 120
(B) 180
(C) 210
(D) 225
(E) 250

Soln: $15 gives 14

After that it is an AP with d=2, a=14 and n =99

why n is 99 and not 98
Source: — Problem Solving |

User avatar
Senior | Next Rank: 100 Posts
Posts: 36
Joined: Fri Aug 28, 2009 2:40 am
Location: Singapore
Thanked: 11 times

by uttam.albela » Wed Oct 21, 2009 9:27 pm
First time = 15 - 1 = 14
Second time= 14 + 2 = 14 + 2 (1) = 16
third time = 14 + 2 + 2 = 14 + 2 (2) = 18

As the output is even all the time, u have to keep adding 2 to previous output.

99th time = 14 + 2 (how many times)

From the above correlations you see that for 3rd time you have (how many times)= 2. For 2nd time you have (how many times)= 1.

So for 99th time (how many times) = 98

ans = 14 + (2 * 98) = 14 + 196 = 210

Senior | Next Rank: 100 Posts
Posts: 74
Joined: Sun Aug 02, 2009 9:10 pm
Thanked: 1 times
Followed by:1 members

re

by navdeepbajwa » Wed Oct 21, 2009 11:35 pm
thanks