Problem:

Min-Max

 

For given three integers $a, b, c$,  print the minimum value and the maximum value.

Input

  The input is given in the following format.

$a \; b \; c\;$

  Three integers $a, b, c$ are given in a line.

Output

  Print the minimum and maximum values separated by a space in a line.

Constraints

  
$-1,000,000,000 \leq a, b, c \leq 1,000,000,000$

Sample Input 1

4 5 3

Sample Output 1

3 5



Sample input:
4 5 3


Sample output:
3 5

Submission status: Accepted

Solution code:
nums = list(map(int, input().split(' ')))

max = -float('inf')
min = float('inf')
for num in nums:
    if num > max: max = num
    if num < min: min = num

print(min, max)

Submission status: Accepted

Solution code:

def min_max(a, b, c):
    """Returns the minimum value and the maximum value
    in a, b, c.

    >>> min_max(1, 2, 3)
    (1, 3)
    >>> min_max(1, 3, 2)
    (1, 3)
    >>> min_max(2, 3, 1)
    (1, 3)
    >>> min_max(2, 1, 3)
    (1, 3)
    >>> min_max(3, 1, 2)
    (1, 3)
    >>> min_max(3, 2, 1)
    (1, 3)
    """
    if a < b:
        if b < c:
            return (a, c)
        elif a < c:
            return (a, b)
        else:
            return (c, b)
    else:
        if a < c:
            return (b, c)
        elif b < c:
            return (b, a)
        else:
            return (c, a)


def run():
    vals = [int(x) for x in input().split()]
    x, y = min_max(*vals)
    print(x, y)


if __name__ == '__main__':
    run()

Submission status: Accepted

Solution code:
# coding=utf-8

A = list(map(int, input().split()))
print("{0} {1}".format(min(A), max(A)))

Submission status: Accepted

Solution code:
# AOJ ITP2_3_A: Min-Max
# Python3 2018.6.24 bal4u

a = list(map(int, input().split()))
print(min(a), max(a))

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
print('{} {}'.format(min([a,b,c]), max([a,b,c])))

Submission status: Accepted

Solution code:
def run():
    a, b, c = sorted(int(i) for i in input().split())
    print(" ".join(map(str, [a, c])))

if __name__ == '__main__':
    run()

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
print(min(a), max(a))

Submission status: Accepted

Solution code:
n = list(map(int,input().split()))
print(min(n),max(n))

Submission status: Accepted

Solution code:
def resolve():
    A = [int(i) for i in input().split()]
    print(min(A), max(A))


resolve()

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
print(min(A), max(A))

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
print(min(l),max(l))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	min_max
# CreatedDate:  2020-05-24 15:21:55 +0900
# LastModified: 2020-05-24 15:22:54 +0900
#


import os
import sys

def main():
    a = list(map(int,input().split()))
    print("{} {}".format(min(a),max(a)))

    


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
print(str(min(a)) + " " + str(max(a)))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b,c=map(int,input().split())

print(min(a,b,c),max(a,b,c))

Submission status: Accepted

Solution code:
data=list(map(int,input().split()))
data.sort()
print(data[0],data[2])

Submission status: Accepted

Solution code:
S = list(map(int,input().split()))

print("{} {}".format(min(S),max(S)))

Submission status: Accepted

Solution code:

l = list(map(int,(input().split())))


print(f'{min(l)} {max(l)}')

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
print(min(a),max(a))

Submission status: Accepted

Solution code:
arr = [*map(int, input().split())]
print(min(arr), max(arr))

Submission status: Accepted

Solution code:
x = list(map(int,input().split()))
print(min(x),max(x))

Submission status: Accepted

Solution code:

def main():
    n = list(map(int,input().split()))
    print (min(n),max(n))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
print(min(a), end = " ")
print(max(a))

Submission status: Accepted

Solution code:
l=list(map(int,input().split()))
print(min(l),max(l))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
a.sort()
print(a[0],a[2])

Submission status: Accepted

Solution code:
inp = list(map(int, input().split()))
print("{} {}".format(min(inp), max(inp)))

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
print(min(a,b,c), max(a,b,c))

Submission status: Accepted

Solution code:
numbers = list(map(int, input().split()))
print(str(min(numbers))+" "+str(max(numbers)))

Submission status: Accepted

Solution code:
A = list(map(int,input().split()))
print(min(A),max(A))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
print("{} {}".format(min(a),max(a)))

Submission status: Accepted

Solution code:
A = [int(a) for a in input().split()]
print(min(A), max(A))

Submission status: Accepted

Solution code:

if __name__ == "__main__":

    param = input().split(" ")

    seq = [ int(a) for a in param]

    min = min(seq)
    max = max(seq)

    print(str(min) + " " + str(max))

Submission status: Accepted

Solution code:
a = sorted(list(map(int,input().split())))
print(a[0],a[-1])

Submission status: Accepted

Solution code:
temp = list(map(int, input().split()))
print(min(temp), max(temp))

Submission status: Accepted

Solution code:
a=list(map(int, input().split()))
print(min(a),max(a))

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
print('%d %d' % (min(a), max(a)))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))

max=a[0]
min=a[0]

for i in range(1,len(a)):
    if max<a[i]:
        max=a[i]
    if min>a[i]:
        min=a[i]

print(str(min)+" "+str(max))

Submission status: Accepted

Solution code:
a=[int(i) for i in input().split()]
print(min(a),max(a))

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split()]
print("{} {}".format(min(l),max(l)))

Submission status: Accepted

Solution code:
nums = list(map(int, input().split()))
print(min(nums), max(nums))

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    numbers = list(map(lambda x: int(x), input().split()))
    min_num = min(numbers)
    max_num = max(numbers)
    print(f"{min_num} {max_num}")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())

if a < b:
    if c < a:
        print(c, b)
    elif b < c:
        print(a, c)
    else:
        print(a, b)
else:
    if c < b:
        print(c, a)
    elif a < c:
        print(b, c)
    else:
        print(b, a)

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split( ))
mx=max([a,b,c])
mn=min([a,b,c])
print(mn,mx)

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))

print(min(a),max(a))

Submission status: Accepted

Solution code:
abc = [int(x) for x in input().split()]
 
print(min(abc), max(abc))

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
print(min(a), max(a))

Submission status: Accepted

Solution code:
from sys import stdin
from heapq import heapify
lines = stdin.readlines()
for line in lines:
    line = list(map(int,line.split()))
    print(min(line), max(line))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Basic Operations - Min-Max
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP2_3_A&lang=jp

"""
res = sorted(map(int, input().split()))
print(res[0], res[-1])

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	
	a,b,c = map(int,input().split())

	print(min(a,b,c),max(a,b,c))

Submission status: Accepted

Solution code:
list_num = list(map(int, input().split()))

print(min(list_num), max(list_num))

Submission status: Accepted

Solution code:
a, b , c = map(int, input().split())
print(min(a,b,c),max(a,b,c))

Submission status: Accepted

Solution code:
ary = list(map(int, input().split(' ')))
print(min(ary), max(ary))

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
print("%d %d"%(min(a),max(a)))

Submission status: Accepted

Solution code:
num=list(map(int,input().split()))
print(str(min(num))+" "+str(max(num)))

Submission status: Accepted

Solution code:
abc = [int(x) for x in input().split()]

print(min(abc), max(abc))

Submission status: Accepted

Solution code:
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP2_3_A&lang=jp
# Min-Max

from functools import reduce
from collections import deque
import sys
input = sys.stdin.readline


def main():
    l  = list ( map(int,input().split()))
    max = reduce(lambda a,b : a if a > b else b,l)
    min = reduce(lambda a,b : a if a < b else b,l)
    print (min,max)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
num = list(map(int, input().split()))
print(min(num), max(num))

Submission status: Accepted

Solution code:
*A, = map(int, input().split())
A.sort()
print(A[0], A[-1])

Submission status: Accepted

Solution code:
li = [int(i) for i in input().split()]
print(min(li), max(li))

Submission status: Accepted

Solution code:
a= list(map(int, input().split()))
print('{} {}'.format(min(a), max(a)))

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
print(min(a, b, c), max(a, b, c))

Submission status: Runtime Error

Solution code:
nums = list(map(int, input().split(' ')))

max = -float('inf')
min = flaot('inf')
for num in nums:
    if num > max: max = num
    if num < min: min = num

print(min, max)

Submission status: Runtime Error

Solution code:
a, b, c = list(map(int, input().splist()))
print('{} {}'.format(min([a,b,c], max([a,b,c]))))

Submission status: Runtime Error

Solution code:
a, b, c = list(map(int, input().split()))
print('{} {}'.format(min([a,b,c], max([a,b,c]))))

Submission status: Runtime Error

Solution code:
a, b, c = list(map(int, input().split()))
print('{} {}'.format(min([a,b,c], max([a,b,c])))