Professional Documents
Culture Documents
Registered Email
address:hemantbodhakar80@gmail.com
Q. No. A B C D
1
2
3
4
5
6
7
8
9
10
SUBJECTIVE QUESTIONS
Q. No. 1
Assume that n is 1 to 9
Therefore,
1!-1=0
2!-1=1
3!-1=5
4!-1=24-1=23+32=55
5!-1=120-1=119+911=1030+301=1331
6!-1=720-1=719+917=1636+6361=7997
7!-1=5040-1=5039+9305=14344+44311=58685
8!-1=40320-1=40319+91304=131623+326131=45774.
Etc
Q. No. 2.
As it is said that,
Debjit lists down the name of all the students of class IX B on 52
different bits of paper,
folds all of them neatly and hands them over to Agnishom. (All
bits of paper look alike and
are of equal size). Now Debjit asks Agnishom to randomly pick
any 5 bits of paper from
the lot. Agnishom is allowed to inspect and shuffle the bits of
paper well before picking any
five. He picks out 5 bits and then hands them to Debjit (Ashwin
can’t see any of this).
Debjit inspects at the bits and picks 1 bit out and gives it back to
Agnishom. Debjit then
arranges the other four bits in a special way, and give those 4
bits, all folded, and in a neat
pile, to Ashwin.
Ashwin inspects at the 4 bits Debjit gave him, and says out loud,
the name of the student on the bit which Agnishom is holding.
Here Showing will say the detailed process which they have done
here and surprisingly the name called by
Ashwin is Agnihoshans name.
Q. No. 3.
2
4 2
1 4
1 3
4
1 2 16
2 3 15
3 4 4
2 4 15
4 1
2 4
4
1 3 7
2 3 1
1 2 8
1 4 4
SAMPLE OUTPUT
15
5
Explanation
For first test case -
There are already roads between cities 1 - 4 and 1 - 3.
Thus cities 1, 3 and 4 are connected. Now we need to
connect city 2 with any of them to make a connected
Kingdom. The minimum cost of the road that connects
to city 2 is 15.
Time Limit:2.0 sec(s) for each input file.
Memory Limit:256 MB
Source Limit:1024 KB
Marking Scheme:Marks are awarded when all the
testcases pass.
Allowed Languages:Bash, C, C++, C++14, Clojure,
C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8,
JavaScript(Rhino), JavaScript(Node.js), TypeScript,
Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C,
OCaml, Octave, Pascal, Perl, PHP, Python, Python 3,
R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1,
Visual Basic
Q. No. 4
A positive integer p is a prime if the only divisors of
p are 1 and p. If p
k
| a and p
k+1 - a where p is a prime, i.e. p
k
is the highest
power of p dividing a, then we denote this by p
kka.
Useful Facts
• If a, b > 0, and a | b, then a ≤ b.
• If a | b1, a | b2, . . . , a | bn, then for any integers c1, c2, . . . , cn,
a|
Xn
i=1
bici