You are on page 1of 1

Round 2 -2coding (120min)

Both completeed sir

program 1 :(same as program given on 25 06 2023) (8/8testcases)


program 2 : Sum of all unstable numbers among 5 input numbers (input1, input2,
input3,input4, input5) (8/8testcases )

You are provided with 3 numbers: input1, input2 and input3


Each of these are four digit numbers within the range >= 1000 and <= 9999
i.e.
1000 <= input1 <= 9999
1000 <= input2 <= 9999
1000 <= input3 <= 9999
You are expected to find the key using the below formula -
key = [SMALLEST digit in the thousands place of all three numbers]
[Smallest digit in the hundreds place of all three numbers]
[SMALLEST digit in the tens place of all three numbers]
[Smallest digit in the units place of all three numbers]

Given three numbers, write an algorithm to find the key using the above mentioned
formula.

Input
The input consists of three space-separated integers - input1, input2 and input3
representing the three four - digit numbers.

Output
Print an integer representing the concatenation of four digits where first digit
represents
the smallest digit in the thousands place of all three numbers;
second digit represents the smallest digit in the hundreds place of all three
numbers;
third digit represents the smallest digit in the tens place of all three numbers
and
fourth digit represents the smallest digit in the units place of all three
numbers.

Example
Input:
3521 2452 1352
Output:
1321

You might also like