Problem B
Basic Programming 1
You think you can code?
This problem will test you on various basic programming
techniques.
You are given two integers
Based on the value of
|
Action Needed |
|
Print |
|
Print “Bigger” if
|
Print “Equal” if
|
|
Print “Smaller” otherwise (without the quotes); |
|
Ignore other indices of |
|
|
Print the median of three integers { |
Ignore other indices of |
|
|
Print the sum of all integers in |
|
Print the sum of all even integers in |
|
Apply modulo (%) |
Map integer |
|
Finally, print the sequence of characters as a string (without the spaces) |
|
|
a. Start from index |
b. Jump to index |
|
c. If the current index |
|
d. Else if the current index |
|
e1. Otherwise, go back to step b; |
|
e2. If doing this leads to an infinite loop, print “Cyclic” and stop; |
|
(all output are without the quotes) |
Input
The first line of the input contains an integer
The second line of the input contains
Output
For each test case, output the required answer based on the
value of
Scoring
There are
All
Each hidden test case worth
Sample Input 1 | Sample Output 1 |
---|---|
7 1 1 2 3 4 5 6 7 |
7 |
Sample Input 2 | Sample Output 2 |
---|---|
7 2 1 2 3 4 5 6 7 |
Smaller |
Sample Input 3 | Sample Output 3 |
---|---|
7 3 1 2 3 4 5 6 7 |
2 |
Sample Input 4 | Sample Output 4 |
---|---|
7 4 1 2 3 4 5 6 7 |
28 |
Sample Input 5 | Sample Output 5 |
---|---|
7 5 1 2 3 4 5 6 7 |
12 |
Sample Input 6 | Sample Output 6 |
---|---|
10 6 7 4 11 37 14 22 40 17 11 3 |
helloworld |
Sample Input 7 | Sample Output 7 |
---|---|
3 7 1 0 2 |
Cyclic |