0% found this document useful (0 votes)
10 views3 pages

Jim and The Jokes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Jim and The Jokes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

& Run :

Step 1 : Base Conversion .

(5 23) +
Inputs h :
* Date l : ,
2x5 + 345' =
10+3 = 13

523 * Date 2 : (8 42) ,


>
-
4x8' + 2 x 8' =
32+2 =
34

842 * Date 3: (2 ,
13) + Invalid /digit 32 base 2)
13
2 *
Dateh : (5 23)
,
-
Same as Date 1 =
13
523
Valid values
array [13 3h 13] : , ,

Step 2 :
Sorting Afterqsort [13 13 34] , ,

Step3 Counting Pairs


:

Group [13 13] has frequency


* i = 0 :
,
=
2

Pairs =
2
x

(2-1)/2 = 1

ans+=1 , ans = 1

frequency
i has
1
Group [34]
* = :
=
1

Pairs =
1
*

(1-1)/2 =
0
ans += 0 ans = 1
,

Step 4 :

Final Answer : I

You might also like