Problem:


Score : 100 points

Problem Statement

There are three airports A, B and C, and flights between each pair of airports in both directions.

A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.

Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.

What is the minimum possible sum of the flight times?

Constraints

1 \leq P,Q,R \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

P Q R

Output

Print the minimum possible sum of the flight times.

Sample Input 1

1 3 4

Sample Output 1

4

The sum of the flight times in the route A \rightarrow B \rightarrow C: 1 + 3 = 4 hours

The sum of the flight times in the route A \rightarrow C \rightarrow C: 4 + 3 = 7 hours

The sum of the flight times in the route B \rightarrow A \rightarrow C: 1 + 4 = 5 hours

The sum of the flight times in the route B \rightarrow C \rightarrow A: 3 + 4 = 7 hours

The sum of the flight times in the route C \rightarrow A \rightarrow B: 4 + 1 = 5 hours

The sum of the flight times in the route C \rightarrow B \rightarrow A: 3 + 1 = 4 hours

The minimum of these is 4 hours.

Sample Input 2

3 2 3

Sample Output 2

5



Sample input:
1 3 4


Sample output:
4

Submission status: Accepted

Solution code:
AB, BC, AC = [int(_) for _ in input().split(" ")]

M = [[0, AB, AC],
     [AB, 0, BC],
     [AC, BC, 0]]

def A(l):
    t = [0] * l
    def Sub(targetList, n):
        if 1:
            if len(targetList) == 1:
                t[n] = targetList[0]
                yield t
                t[n] = 0
            for i in range(len(targetList)):
                p = targetList[:i] + targetList[i+1:]
                t[n] = targetList[i]
                for j in Sub(p, n+1):
                    yield j
        else:
            pass
    
    for i in (Sub(tuple(range(l)), 0)):
        yield i

def Calc(list):
    _sum = 0
    for index in range(1, len(list)):
        _from = list[index-1]
        _to = list[index]
        _sum += M[_from][_to]
    return _sum

_min = Calc([0,1,2])
for i in A(3):
    _sum = Calc(i)
    if _min > _sum:
        _min = _sum
print (_min)

Submission status: Accepted

Solution code:
l = [int(_) for _ in raw_input().split(" ")]
l.sort()
print l[0] + l[1]

Submission status: Accepted

Solution code:
import numpy as np
P, Q, R = map(int, input().split())
print(np.min([P+Q, Q+R, R+P]))

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())
print(min(P + Q, Q + R, R + P))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

x = sorted(list(map(int, input().split())))
print(x[0]+x[1])

Submission status: Accepted

Solution code:
print(sum(sorted([int(x) for x in input().split(" ")])[:2]))

Submission status: Accepted

Solution code:
import itertools
PQR=list(map(int,input().split()))
kyori = list(itertools.permutations(PQR,2))
kyori_minimum = min([sum(k) for k in kyori])
print(kyori_minimum)

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
M=max(A,B,C)
ans=A+B+C-M
print(ans)

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
min1 = a+c
min2 = b+c
min3 = a+b
print(min(min1,min2,min3))

Submission status: Accepted

Solution code:
a, b, c = map(int, raw_input().split())
x = a
if x < b:
    x = b
if x < c:
    x = c
y = a + b + c
print y - x

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())
timefly = [P+Q,P+R,Q+R]
print(min(timefly))

Submission status: Accepted

Solution code:
#空港 A, B, C があり、それぞれの空港の間では、双方向に飛行機が運航しています。
#空港 A, B 間の飛行時間は片道 P 時間、空港 B, C 間の飛行時間は片道 Q 時間、空港 C, A 間の飛行時間は片道 R 時間です。
#いずれかの空港からスタートして他の空港に飛行機で移動し、さらにそのどちらでもない空港に飛行機で移動するような経路を考えます。
#飛行時間の和は最短で何時間になるでしょうか。

l = sorted(map(int, input().split()))
s = (l[:2])
print(sum(s))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# input
P, Q, R = map(int, input().split())

# solve & output
print((P + Q + R) - max(P, Q, R))

Submission status: Accepted

Solution code:
d = [int(i) for i in input().split()]
print(sum(d) - max(d))

Submission status: Accepted

Solution code:
def main():
    p = list(map(int,input().split()))
    ans = []

    p.sort()

    ans = p[0] + p[1]
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
  m = 10000000
  times = list(map(int, input().split()))
  for i in range(len(times)):
    for j in range(i + 1, len(times)):
      m = min(m, times[i] + times[j])
  print(m)


main()

Submission status: Accepted

Solution code:
p,q,r = map(int,input().split())
m=max(p,q,r)
print(p+q+r-m)

Submission status: Accepted

Solution code:
li = list(map(int, input().split()))
li = sorted(li)
s = 0
for i in range(2):
    s += li[i]
print(s)

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
print("{}".format(p+q+r-max([p,q,r])))

Submission status: Accepted

Solution code:
P, Q, R = map(int,input().split())
minimum_time = P + Q

if minimum_time > Q + R:
  minimum_time = Q + R
if minimum_time > R + P:
  minimum_time = R + P

print(minimum_time)

Submission status: Accepted

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

distances.sort()

print(distances[0]+distances[1])

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
a = max(p, q, r)
if a == p:
  print(q+r)
elif a == q:
  print(p+r)
elif a == r:
  print(p+q)

Submission status: Accepted

Solution code:
P,Q,R=map(int,input().split())

print(P+Q+R-max(P,Q,R))

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# 初項s, 交差dのn個の数列の和
def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def main():
    P, Q, R = map(int, input().split())
    print(sum([P, Q, R]) - max([P, Q, R]))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
p,q,r = map(int,input().split())
lst = [p,q,r]
lst.sort()
print(lst[0]+lst[1])

Submission status: Accepted

Solution code:
#ABC-129-A
#airplane
#3つの整数の入力をリストとして受けいれる
PQR = list(map(int, input().split()))
ans =sum(PQR)-max(PQR)
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin

arr = [int(x) for x in stdin.readline().rstrip().split()]

arr.sort()

print(arr[0]+arr[1])

Submission status: Accepted

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

s=a+b+c
s-=max(a,b,c)

print(s)

Submission status: Accepted

Solution code:
A, B, C = map(int,input().split())
print(sum([A,B,C])-max(A,B,C))

Submission status: Accepted

Solution code:
ls = sorted([x for x in map(int, input().split(' '))])
print(ls[0] + ls[1])

Submission status: Accepted

Solution code:
A, B, C = map(int,input().split())
print(sum([A,B,C])-max(A,B,C))

Submission status: Accepted

Solution code:
p, q, r = map(int,input().split())
p1 = p + q
p2 = p + r
p3 = q + r
p4 = [p1,p2,p3]
print(min(p4))

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())

ans = P + Q + R - max(P,Q,R)
print(ans)

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())

p1 = p + q
p2 = p + r
p3 = q + r


P = [p1,p2,p3]
print(min(P))

Submission status: Accepted

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

t.sort()

print(t[0]+t[1])

Submission status: Accepted

Solution code:
p,q,r = map(int, input().split())

print(min(p+q, q+r, r+p))

Submission status: Accepted

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

pqr = list(pqr)
pqr.sort()
print(pqr[0]+pqr[1])

Submission status: Accepted

Solution code:
line = map(int, input().split())
line = list(line)
line.sort()
print(line[0]+line[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(map(int, input().split()))
S.sort()
S.pop()
print(sum(S))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#A,B,Cの空港
#P,Q,R時間かかる
#最短何時間？

#入力
line = input().split()
ab = int(line[0])
bc = int(line[1])
ca = int(line[2])

#最小時間を求める
time = [ab, bc, ca]
min_time = sum(time) - max(time)

print(min_time)

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
l=[]
l.append(p+q)
l.append(p+r)
l.append(q+r)
print(min(l))

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())

ans = sum([p, q, r]) - max(p, q, r)
print(ans)

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())
S = P + Q + R
print(min(S - P, S - Q, S - R))

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())

print(min([P+Q,Q+R,R+P]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P, Q, R = map(int,input().split())
print(P+Q+R-max(P,Q,R))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a = list(map(int, input().split()))
a.sort()
print(sum(a[:2]))

Submission status: Accepted

Solution code:
P,Q,R = list(map(int, input().split()))
print(min([P+Q, Q+R, R+P]))

Submission status: Accepted

Solution code:
p, q, r = map(int,input().split())

min_time = min(p+q,q+r,r+p)

print(min_time)

Submission status: Accepted

Solution code:
from sys import stdin
from collections import defaultdict

P, Q, R = [int(x) for x in stdin.readline().rstrip().split()]

min = P + Q
if min > P + R:
    min = P + R
if min > Q + R:
    min = Q + R
    
print(min)

Submission status: Accepted

Solution code:
import itertools

arr = [int(i) for i in input().split()]
arrs = list(itertools.combinations(arr,2))
sum_arr = [sum(com) for com in arrs]

print(min(sum_arr))

Submission status: Accepted

Solution code:
time = list(map(int, input().split()))
sum = time[0] + time[1]
if sum > time[1] + time[2]:
  sum = time[1] + time[2]
if sum > time[0] + time[2]:
  sum = time[0] + time[2]
print(sum)

Submission status: Accepted

Solution code:
p,q,r = map(int,input().split())
print(min(p + q, q + r, r + p))

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc129/tasks/abc129_a

pqr = [int(i) for i in input().split()]
pqr.sort()
print(pqr[0]+pqr[1])

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
x = a+b
y = b+c
z = c+a
if x <= y and x <= z:
  print(x)
elif y <= x and y <= z:
  print(y)
elif z <= x and z <= y:
  print(z)

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
m = p+q if (p < r) else q+r
print (m if (m < p+r) else p+r)

Submission status: Accepted

Solution code:
a,b,c = input().split()
print(min([int(a)+int(b),int(a)+int(c),int(b)+int(c)]))

Submission status: Accepted

Solution code:
#bin/usr/env python3

p,q,r = map(int, input().split())

li = [p,q,r]
li_new = sorted(li)
total = li_new[0] + li_new[1]

print(total)

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
ans = min(p + q, q + r, r + p)
print(ans)

Submission status: Accepted

Solution code:
#coding:utf-8
min = 0
L = list(map(int,input().split()))
for i in range(len(L)):
    min += L[i]
for i in range(3):
    for j in range(3):
        if i != j:
            if L[i]+L[j] < min :
                min = L[i]+L[j]
print(min)

Submission status: Accepted

Solution code:
n = sorted(list(map(int, input().split())))
print(sum(n[:2]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(input().split())
a.sort()
b =a[0]
c =a[1]
print(int(b)+int(c))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import bisect
from collections import defaultdict

def main():
    P, Q, R = map(int, input().split())
    max_edge = max([P, Q, R])
    min_path = sum([P, Q, R]) - max_edge
    
    print(min_path)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from itertools import combinations
p = [int(x) for x in input().split()]
print(min(sum(x) for x in combinations(p, 2)))

Submission status: Accepted

Solution code:
p,q,r = map(int, input().split())

result = min(p+q,p+r,q+r)
print(result)

Submission status: Accepted

Solution code:
List = [int(i) for i in input().split()]
List.sort()
print(List[0]+List[1])

Submission status: Accepted

Solution code:
Time = list(map(int,input().split()))
Time.sort()
print(Time[0]+Time[1])

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())

s=[]

s.append(p+q)
s.append(r+q)
s.append(p+r)


ans=min(s)
print(ans)

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())

if P + Q <= Q + R:
    if P + Q <= P + R:
        print(P + Q)
    else:
        print(P + R)
else:
    if Q + R <= P + R:
        print(Q + R)
    else:
        print(P + R)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = list(map(int,input().split(" ")))
print(sum(li)-max(li))

Submission status: Accepted

Solution code:
#A問題
time_list = input().split()
time_list = [int(i) for i in time_list]
time_list.sort()
print(time_list[0]+time_list[1])

Submission status: Accepted

Solution code:
a=list(map(int,raw_input().split()))
a.sort()
print(a[0]+a[1])

Submission status: Accepted

Solution code:
def solve(string):
    *pqr, = map(int, string.split())
    return str(sum(sorted((pqr))[:2]))


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

Solution code:
lists = list(map(int,input().split(" ")))
lists.sort()
print(lists[0] + lists[1])

Submission status: Accepted

Solution code:
aps = list(map(int, input().split()))
print(min(sum(aps[:i]+aps[i+1:]) for i in range(len(aps))))

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())
ans = min(P + Q, Q + R , R + P)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def io_generator():
	return input()
	
def ioByFile(fn='inputFile.txt'):
	with open(fn) as f:
		for line in f:
			yield line[:-1]

#+++++ +++++ +++++#
		
def main(a_io):
	p, q, r = map(int, a_io().split())
	ret=min(p+q,q+r,r+p)
	print(ret)
	
#+++++ +++++ +++++#

if __name__ == "__main__":
	io= lambda : io_generator()
	if sys.platform =='ios':
		testInput=ioByFile()
		io=lambda : next(testInput)
	main(io)

Submission status: Accepted

Solution code:
# スペース区切りの整数の入力
p, q, r=map(int, input().split())

# 出力
print(p+q+r-max(p, q, r))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())

route = min(p+q, q+r, r+p)
print(route)

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split(' '))

x = p + q
y = q + r
z = p + r

ans = min(x, y, z)
print(ans)

Submission status: Accepted

Solution code:
x = input().split()
sum1 = int(x[0]) + int(x[1])
sum2 = int(x[1]) + int(x[2])
sum3 = int(x[0]) + int(x[2])
print(min(sum1, sum2, sum3))

Submission status: Accepted

Solution code:
P, Q, R =map(int ,input().split())
print(min(P+Q, Q+R, R+P))

Submission status: Accepted

Solution code:
p, q, r = sorted(list(map(int, input().split())))
print(p + q)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
route_time = [int(i) for i in input().split()]
max_route_time = 0
sum_route_time = 0

for i in route_time:
    if max_route_time < i:
        max_route_time = i
    sum_route_time += i

sum_route_time -= max_route_time

print(sum_route_time)

Submission status: Accepted

Solution code:
a,b,c= (int(i) for i in input().split())

def function(a,b,c):
    sum = a+b+c
    ans = sum - max(a,b,c)
    return ans
  
print(function(a,b,c))

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())

a = P + Q
b = Q + R
c = R + P

if b > a and c > a:
  print(a)
elif b > c:
  print(c)
else:
  print(b)

Submission status: Accepted

Solution code:
input_data=input()

X=input_data.split()

P=int(X[0])

Q=int(X[1])

R=int(X[2])

S=max([P,Q,R])

print(P+Q+R-S)

Submission status: Accepted

Solution code:
P, Q, R = input().split()
P = int(P)
Q = int(Q)
R = int(R)

print(min(P+Q, min(Q+R, R+P)))

Submission status: Accepted

Solution code:
s=input().split()
for i in range(3):
    s[i]=int(s[i])
s.sort()
print(s[0]+s[1])

Submission status: Accepted

Solution code:
P,Q,R=map(int, input().split())
s=[]
s.append(P)
s.append(Q)
s.append(R)
s.sort()
print(s[0]+s[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[p,q,r] = [int(i) for i in input().split()]
print(min([p+q,q+r,r+p]))

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())

sum = P + Q
if sum > P + R:
    sum = P + R
if sum > Q + R:
    sum = Q + R

print(sum)

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
ans=[p+q,q+r,r+p]
print(min(ans))

Submission status: Accepted

Solution code:
#abc129a

p,q,r=map(int,raw_input().split())

l=[p,q,r]
l.sort()
print l[0]+l[1]

Submission status: Accepted

Solution code:
P,Q,R=map(int, input().split())
print(min(P+Q, Q+R, R+P))

Submission status: Accepted

Solution code:
i = list(map(int,input().split()))
a = i[0]+i[1]
b = i[0]+i[2]
c = i[1]+i[2]
d = [a,b,c]
print(min(d))

Submission status: Accepted

Solution code:
import itertools

def main():
    inputs = list(map(int, input().split()))
    print(sum(min(list(itertools.permutations(inputs, 2)))))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x,y,z = map(int, input().split())
a = [(x+y),(y+z),(x+z)]
min = x+y
for i in range(3):
    if(a[i]<min):
        min = a[i]
        
print(min)

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
print(min([p + q, q + r, r + p]))

Submission status: Accepted

Solution code:
a = tuple(map(int, input().split()))
print(sum(a) - max(a))

Submission status: Accepted

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

print(sum(nums) - max(nums))

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
l=[A,B,C]
l.sort()
ans=l[1]+l[0]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import itertools

# スペース区切りの整数の入力
h = map(int, input().split())

hlist = list(itertools.combinations(h, 2))

tempHour=0
ans=0

for i in range(len(hlist)):
    tempHour=hlist[i][0]+hlist[i][1]
    if tempHour < ans or ans == 0:
        ans = tempHour
# 出力
print(ans)

Submission status: Accepted

Solution code:
print(sum(sorted(list(map(int, input().split())))[:2]))

Submission status: Accepted

Solution code:
print(sum(sorted(list(map(int, input().split())))[0:2]))

Submission status: Accepted

Solution code:
# スペース区切りの整数の入力
p,q,r = map(int, input().split())
# 文字列の入力
min_move = p + q + r - max(p,q,r)
print(min_move)

Submission status: Accepted

Solution code:
A = list(map(int, input().split(' ')))
A.sort()
print(A[0] + A[1])

Submission status: Accepted

Solution code:
P, Q, R = input().split(" ")
P = int(P)
Q = int(Q)
R = int(R)
 
ABC = P + Q
ACB = R + Q
BAC = P + R
 
print(min(ABC,ACB,BAC))

Submission status: Accepted

Solution code:
P,Q,R=map(int,input().split(" "))
SUM=P+Q+R
A=min(SUM-P,SUM-Q,SUM-R)
print(A)

Submission status: Accepted

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

A = a + b
B = b + c
C = c + a

if A < B:
  if C < A:
    print(C)
  else:
    print(A)
elif C < B:
	print(C)    
else:
    print(B)

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())
FlyTime = [P,Q,R]
FlyTime.sort()
print(FlyTime[0]+FlyTime[1])

Submission status: Accepted

Solution code:
p,q,r=input().split()
p=int(p)
q=int(q)
r=int(r)
m=list()
m.append(p)
m.append(q)
m.append(r)
m.sort()
print(m[0]+m[1])

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())
print( min(P+Q, Q+R, R+P) )

Submission status: Accepted

Solution code:
def main():
	P, Q, R = map(int, input().split())
	m = max(P, Q)
	m = max(m, R)
	ans = P+Q+R-m
	print(ans)


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
P, Q, R = map(int, input().split())
print( min(P+Q, Q+R, R+P) )

Submission status: Accepted

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

print(nums[0] + nums[1])

Submission status: Accepted

Solution code:
p = list(map(int, input().split()))
print(sum(p)-max(p))

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
A = a+b
B = b+c
C = c+a
lm = [A,B,C]
print(min(lm))

Submission status: Accepted

Solution code:
# A - Airplane
P, Q, R = map(int, input().split())

list = [P, Q, R];
list.sort();

print(list[0] + list[1]);

Submission status: Accepted

Solution code:
s=list(map(int,input().split()))
a=0
for i in range(3):
  a=a+s[i]
b=max(s)
a=a-b
print(a)

Submission status: Accepted

Solution code:
s = input().split()
ld = sorted(s, reverse=False)[:2]
s = sum(int(i) for i in ld)
print(s)

Submission status: Accepted

Solution code:
def toInt(x):
    return int(x)

line = input()
kyori = line.split(" ")
result = sorted(kyori, key = toInt)[:2]

print (int(result[0]) + int(result[1]))

Submission status: Accepted

Solution code:
a = [int(_) for _ in input().split()] 
a.sort()
print(a[0] + a[1])

Submission status: Accepted

Solution code:
input_first = input()
for k in range(2):
    a = input_first.rstrip().split(' ')
p = int(a[0])
q = int(a[1])
r = int(a[2])
b=sorted(a)
print(int(b[0])+int(b[1]))

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split(' '))
print(min([
  p+q,
  p+r,
  q+r]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p,q,r = map(int,input().split(' '))
print(p+q+r-max(p,q,r))

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**20

P,Q,R = map(int,input().split())
x = max(P,Q,R)
print(P+Q+R-x)

Submission status: Accepted

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

ABC = sorted(ABC)

print(sum(ABC[:2]))

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
ans=min(p+q,q+r,r+p)
print(ans)

Submission status: Accepted

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

c.remove(max(c))

print(sum(c))

Submission status: Accepted

Solution code:
s = list(map(int, input().split()))
max = -1

for i in range(0, 3):
    if(max < s[i]):
        max = s[i]
        
ans = s[0] + s [1] + s[2] - max
print(ans)

Submission status: Accepted

Solution code:
p = [int(i) for i in input().split()]
print(sum(p) - max(p))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
b=a[0]+a[1]
if b>a[1]+a[2]:
  b=a[1]+a[2]
if b>a[0]+a[2]:
  b=a[0]+a[2]
print(b)

Submission status: Accepted

Solution code:
pqr = list(map(int, input().split()))
print(sum(pqr) - max(pqr))

Submission status: Accepted

Solution code:
a = [ int(i) for i in input().split() ]
a = sorted(a)
print( a[0] + a[1] )

Submission status: Accepted

Solution code:
a=input().split(" ")
a=[int(x) for x in a]
a.sort()
print(a[0]+a[1])

Submission status: Accepted

Solution code:
arr = map(int, raw_input().split())
arr.sort()
ans = arr[0] + arr[1]
print ans

Submission status: Accepted

Solution code:
P, Q, R = list(map(int, input().split()))
print(P+Q+R-max(P,Q,R))

Submission status: Accepted

Solution code:
#-*- coding: utf-8 -*-
import numpy as np

def main(p):
    all = np.sum(p);
    app = list(map(lambda x: -1*(x - all), p));
    print(np.min(app));

if __name__ == '__main__':
    times = list(map(int,input().split()));
    main(times);

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def get_integers(n):
    '''
    Reads in one line of input that contains n integers.
    Returns a list of n integers
    '''
    s = input()
    numbers = s.split(' ')
    r = []
    for x in numbers:
        r.append(int(x))
    return  r

a, b, c = get_integers(3)
 
ab = a+b
bc = b+c
ac = a+c
 
minimum = min(ab,bc,ac)
 
print(minimum)

Submission status: Accepted

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


 
ab = a+b
bc = b+c
ac = a+c
 
minimum = min(ab,bc,ac)
 
print(minimum)

Submission status: Accepted

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

ab = a+b
bc = b+c
ac = a+c

ret = min(ab,bc,ac)

print(ret)

Submission status: Accepted

Solution code:
P, Q ,R = map(int,input().split(' '))
lst = [P+Q,Q+R,R+P]
print(min(lst))

Submission status: Accepted

Solution code:
a,b,c=map(int,raw_input().split())
arr=[]
arr.append(a)
arr.append(b)
arr.append(c)
arr.sort()
print(arr[0]+arr[1])

Submission status: Accepted

Solution code:
a = input().split()
a = [int(i) for i in a]
a = sorted(a)
print(a[0]+a[1])

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())
ans = P + Q + R - max(P,Q,R)
print(ans)

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split(" "))
max = p + q
if (r + q) < max:
    max = r + q
if (p + r) < max:
    max = p + r
print(max)

Submission status: Accepted

Solution code:
aaa = list(map(int,input().split()))
d = min(aaa)
aaa.remove(d)
e = min(aaa)
print(d + e)

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split()]
print(sum(l) - max(l))

Submission status: Accepted

Solution code:
from itertools import combinations

P, Q, R = map(int, input().split())

RR = min([a + b for a, b in combinations([P, Q, R], 2)])

print(RR)

Submission status: Accepted

Solution code:
p, q, r = list(map(int, input().split()))

print(p + q + r -max(p, q, r))

Submission status: Accepted

Solution code:
a2b , b2c, c2a = map(int,input().split())
if b2c <= a2b and c2a <= a2b:
    print(b2c + c2a)
if a2b < b2c and  c2a <= b2c:
    print(a2b + c2a)
if b2c < c2a and a2b < c2a:
    print(b2c + a2b)

Submission status: Accepted

Solution code:

P,Q,R = map(int,input().split())

print(P+Q+R - max(P,Q,R))

Submission status: Accepted

Solution code:

#P :time a-b
#Q :time b-c
#R :time c-1

#1<=P,Q,R <=100
timelist = [0 for i in range(3)]

timelist[0],timelist[1],timelist[2] = map(int,input().split())
time = 200
for i in range(3):
    for j in range(i+1,3):
        if( time > (timelist[i]+timelist[j]) ):
            time = (timelist[i]+timelist[j])
print(time)

Submission status: Accepted

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

print("{}".format(PQR[0] + PQR[1]))

Submission status: Accepted

Solution code:
line = map(int, input().split())
line = list(line)
line.sort()
print(line[0]+line[1])

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
x=[p+q,q+r,r+p]
print(min(x))

Submission status: Accepted

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

output = []
output.append(i[0]+i[1])
output.append(i[1]+i[2])
output.append(i[2]+i[0])

print(min(output))

Submission status: Accepted

Solution code:
# A - Airplane
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Submission status: Accepted

Solution code:
p,q,r=[int(x) for x in input().split(' ')]
print(min(p+q,q+r,p+r))

Submission status: Accepted

Solution code:
P,Q,R=input().split()

P=int(P)
Q=int(Q)
R=int(R)

abc=P+Q
bca=Q+R
cab=R+P

print(min(abc,bca,cab))

Submission status: Accepted

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

print(sum(times)-max(times))

Submission status: Accepted

Solution code:
list = [int(i) for i in input().split()] 
s = min(list)
list.remove(s)
t = min(list)
Time = s+t
print(Time)

Submission status: Accepted

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

durations = sorted(durations)

print(durations[0] + durations[1])

Submission status: Accepted

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

air_list.sort()

print(air_list[0] + air_list[1])

Submission status: Accepted

Solution code:
def solve(p, q, r):
    return min([p+q, q+r, r+p])

p, q, r = map(int, input().split())
print(solve(p, r, q))

Submission status: Accepted

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

print(i[0] + i[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p,q,r = map(int, input().split())
print(p + q + r - max(p,q,r))

Submission status: Accepted

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

print(sum(ls[:-1]))

Submission status: Accepted

Solution code:
a = [int(i) for i in input().split()]
a.sort()
print(a[0]+a[1])

Submission status: Accepted

Solution code:
P,Q,R = input().split(' ')
p, q, r = int(P), int(Q), int(R)
a = p + q
a = p + r if a > p + r else a
a = q + r if a > q + r else a
print(a)

Submission status: Accepted

Solution code:
import collections, heapq, math, sys

p, q, r = map(int, sys.stdin.readline().rstrip().split(' '))

print(sum(sorted([p,q,r])[:2]))

Submission status: Accepted

Solution code:
p,q,r = map(int, input().split())
print(min(p + q,q + r,r+ p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())

max_time = max(P, Q, R)
if max_time == P:
    print(Q + R)
elif max_time == Q:
    print(P + R)
else:
    print(P + Q)

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split(" "))
ar = []
ar.append(a+b)
ar.append(a+c)
ar.append(c+b)
print(min(ar))

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())
print(sum(sorted([P,Q,R])[:2]))

Submission status: Accepted

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

print(a+b+c - max(a,b,c))

Submission status: Accepted

Solution code:
durations = [int(x) for x in input().rstrip(" ").split(" ")]

print( sum(durations) - max(durations))

Submission status: Accepted

Solution code:
p,q,r = [int(x) for x in input().split()]
print(min(p+q,q+r,r+p))