Skip to content

Commit bfe172b

Browse files
Update prime_game.md
1 parent de208bc commit bfe172b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Techgig Code Gladiators 2021/open round/prime_game.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@
44

55
Rax, a school student, was bored at home in the pandemic. He wanted to play but there was no one to play with. He was doing some mathematics questions including prime numbers and thought of creating a game using the same. After a few days of work, he was ready with his game. He wants to play the game with you.
66

7+
### GAME:
8+
9+
Rax will randomly provide you a range [ L , R ] (both inclusive) and you have to tell him the maximum difference between the prime numbers in the given range. There are three answers possible for the given range.
10+
<ol>
11+
<li>There are two distinct prime numbers in the given range so the maximum difference can be found.</li>
12+
<li>There is only one distinct prime number in the given range. The maximum difference in this case would be 0.</li>
13+
<li>There are no prime numbers in the given range. The output for this case would be -1.</li>
14+
</ol>
15+
16+

0 commit comments

Comments
 (0)