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:
PQR = list(map(int, input().split()))
PQR = sorted(PQR)
print(PQR[0] + PQR[1])

Submission status: Accepted

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

import itertools

print(min(list(map(sum, list(itertools.permutations(L, 2))))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

t = sorted(list(map(int, input().split())))

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

Submission status: Accepted

Solution code:
L = [int(i) for i in input().split()]

min_root = []
for i in L:
    for j in L:
        if i != j:
            min_root.append(i+j)
        else:
            continue
            
if len(min_root) > 0:
    print(min(min_root))
else:
    print(L[0]+L[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = [int(i) for i in input().split()]

print(sum(sorted(A)[:2]))

Submission status: Accepted

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

calc_list = [P+Q, Q+R, R+P]

print(min(calc_list))

Submission status: Accepted

Solution code:
# ABC129A - Airplane
lst = sorted(list(map(int, input().rstrip().split())))
print(sum(lst[:2]))

Submission status: Accepted

Solution code:
def solve():
    hours = [int(x) for x in input().split()]
    longestIdx = hours.index(max(hours))
    hours[longestIdx] = 0
    print(sum(hours))
solve()

Submission status: Accepted

Solution code:
IN = input().split()

P = int(IN[0])
Q = int(IN[1])
R = int(IN[2])

X = P + Q
Y = R + Q
Z = P + R

arr = [X,Y,Z]

print(min(arr))

Submission status: Accepted

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

x = max(a,b,c)

print(a+b+c-x)

Submission status: Accepted

Solution code:
S = input().split()  

A = int(S[0])
B = int(S[1])
C = int(S[2])
answer_1 = A + B
answer_2 = A + C
answer_3 = B + C

print(min(answer_1,answer_2,answer_3))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
# 文字列の入力
# s = input()
# 出力
 
 
print("{}".format(min(p+q, q+r, r+p)))

Submission status: Accepted

Solution code:
# Airplane
import sys
import itertools

input = sys.stdin.readline #sys.stdin.readline()のほうが早いらしい

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

combi = list(itertools.combinations(a_list, 2))
sum_list = [sum(i) for i in combi]
print(min(sum_list))

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:
P , Q , R = (int(i) for i in input().split())  
a = 0
b = 0
c = 0
a = P + Q
b = Q + R
c = P + R
print(min(a,b,c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

p, q, r = [int(x) for x in input().rstrip().split(" ")]

s = [0, 0, 0]
s[0] = p + q
s[1] = q + r
s[2] = r + p

print(min(s))

Submission status: Accepted

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

for i in range(3):
  min = p+q
  
  tugi = r+q
  if tugi < min:
    min = tugi
    
  tugi = p+r
  if tugi < min:
    min = tugi

print(min)

Submission status: Accepted

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

Answer = 0
standard = 0

if P >= Q:
  Answer = Q
  standard = P
else:
  Answer = P
  standard = Q

if R >= standard:
  Answer += standard
else:
  Answer += R
  
print(Answer)

Submission status: Accepted

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

ans_list = [list_pqr[0] + list_pqr[1],list_pqr[0] + list_pqr[2],list_pqr[1] + list_pqr[2]]

print(min(ans_list))

Submission status: Accepted

Solution code:
import fractions as fr
import itertools as it
import collections as col
import heapq as hq
import sys
sys.setrecursionlimit(10**9)

"""
N=int(input())
W=list(map(int, input().split()))
ans=10**100
for T in range(1,N):
        S1=sum(W[:T])
        S2=sum(W[T:])
        ans = min(ans, abs(S1-S2))
print(ans)
"""
P,Q,R=map(int, input().split())
print(min([P+Q, P+R, Q+R]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = raw_input().split(' ')

n1 = int(n[0]) + int(n[1])
n2 = int(n[1]) + int(n[2])
n3 = int(n[2]) + int(n[0])

if n1 <= n2:
  if n1 < n3:
    print(n1)
  else :
    print(n3)
elif n2 <= n3:
  print(n2)
else:
  print(n3)

Submission status: Accepted

Solution code:
string = input()
numbers = string.split(" ")
sums = []
sums.append( int(numbers[0]) +int(numbers[1]))
sums.append( int(numbers[0]) +int(numbers[2]))
sums.append( int(numbers[2]) +int(numbers[1]))
print(min(sums))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力取得
P, Q, R = map(int, input().split())


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

print(min([a, b, c]))

Submission status: Accepted

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

for i in list:
  if min > i:
    min = i
print(min)

Submission status: Accepted

Solution code:
mylist = [int(s) for s in input().split()]

mylist.sort()

print(mylist[0]+mylist[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:
def main():
    tt = sorted(map(int, input().split()))
    print(tt[0] + tt[1])


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R = map(int, input().split())
l = [P, Q, R]
l.remove(max(l))
result = sum(l)
print(result)

Submission status: Accepted

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

l = []
for fst in inp:
    inp.remove(fst)
    for sec in inp:
        l.append(fst + sec)

print(min(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
lst = list(map(int, input().split()))
lst.sort()
print(lst[0] + lst[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools

i = list(map(int,input().split(' ')))
p = list(itertools.permutations(i, 2))
#print(p)
a = []
for i in p:
  a.append(sum(i))
  
print(min(a))

Submission status: Accepted

Solution code:
pqr = list(map(int,input().split()))
tmp = 0
time = 1000

for i in range(3):
    for j in range(3):
        if i == j:
            continue
        else:
            tmp = pqr[i] + pqr[j]
            time = min(time,tmp)
print(time)

Submission status: Accepted

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

ans = 10000
ans = min(ans, abc)
ans = min(ans, acb)
ans = min(ans, cab)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
x2 = x.split(" ")

x2.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

print(min(time[0]+time[1], time[1]+time[2], time[2]+time[0]))

Submission status: Accepted

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

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

print(min(a,b,c))

Submission status: Accepted

Solution code:
lista = input().split(" ")
a, b, c = lista
a = int(a)
b = int(b)
c = int(c)
lista1 = [a, b, c]
lista1.sort()
t = lista1[0]+lista1[1]
print(t)

Submission status: Accepted

Solution code:
P,Q,R=map(int,input().split())
l=[P,Q,R]
sorted_l=sorted(l)
ans=sorted_l[0]+sorted_l[1]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input().split()
p = int(a[0])
q = int(a[1])
r = int(a[2])
x = p + q
y = q + r
z = p + r
print(min([x,y,z]))

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
sm = []
sm.append(a[0]+a[1])
sm.append(a[0]+a[2])
sm.append(a[1]+a[2])

ans = min(sm)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    PQR = list(map(int, input().split()))
    newPQR = sorted(PQR)
    arr = newPQR[:2]
    print(arr[0]+arr[1])
main()

Submission status: Accepted

Solution code:
ab, bc, ca = map(int, input().split())

def findmin(ab, bc, ca):
  op1 = ab + bc
  op2 = ca + bc
  op3 = ab + ca
  best = min(op1, op2, op3)
  print(best)
  
findmin(ab, bc, ca)

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np

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

time = [P + Q, Q + R, P + R]

print(np.min(time))

Submission status: Accepted

Solution code:
P,Q,R=map(int,input().split())
a=P+Q
b=Q+R
c=R+P
if a<b:
    if a<c:
        print(a)
    elif c<a:
        print(c)
    else:
        print(c)
elif b<a:
    if b<c:
        print(b)
    elif c<b:
        print(c)
    else:
        print(c)
else:
    if a<c:
        print(a)
    elif c<a:
        print(c)
    else:
        print(c)

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

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

print(sum(l) - max(l))

Submission status: Accepted

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

a = p + q
b = q + r
c = r + p

print(min(a, b, c))

Submission status: Accepted

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

flightTime.sort()
answer = flightTime[0] + flightTime[1]
print(answer)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

print(P+Q)

Submission status: Accepted

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

sum = []
for i in range(3):
    for j in range(3):
        if (i != j):
            sum.append(t[i]+t[j])

print(min(sum))

Submission status: Accepted

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

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

Submission status: Accepted

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


[P, Q, R] = [int(i) for i in input().split()]

min_distance = 10000

# ABC
distance = P + Q
if distance < min_distance:
    min_distance = distance

# ACB
distance = R + Q
if distance < min_distance:
    min_distance = distance

# BAC
distance = P + R
if distance < min_distance:
    min_distance = distance

# BCA
distance = Q + R
if distance < min_distance:
    min_distance = distance

# CAB
distance = R + P
if distance < min_distance:
    min_distance = distance

# CBA
distance = Q + P
if distance < min_distance:
    min_distance = distance

print(min_distance)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    P,Q,R = map(int,input().split())
    X = list()
    XX = 9999999
    X.append(P+Q)
    X.append(P+R)
    X.append(Q+R)
    #print(X)
    for i in X:
        if XX > i:
            XX = i
    print(XX)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

PQR = input()
P = int(PQR.split(' ')[0])
Q = int(PQR.split(' ')[1])
R = int(PQR.split(' ')[2])

#print(P, Q, R)

result = []
result.append(P+Q)
result.append(P+R)
result.append(R+Q)

print(min(result))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
m = x + y
if(m > x + z):
    m = x + z
if(m > y + z):
    m = y + z

print(m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a.append(p)
a.append(q)
a.append(r)
a.sort()
print(a[0] + a[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A = p+q
B = q+r
C = p+r
mylist = [A,B,C]

print(min(mylist))

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:
import sys
import itertools

ts = (int(d) for d in sys.stdin.readline().split())
out = [sum((x0, x1)) for (x0, x1) in itertools.permutations(ts, 2)]
print(min(out))

Submission status: Accepted

Solution code:
lista = input().split(" ")
a, b, c = lista
a = int(a)
b = int(b)
c = int(c)
lista1 = [a, b, c]
lista1.sort()
t = lista1[0]+lista1[1]
print(t)

Submission status: Accepted

Solution code:
a,b,c =input().split(" ")
mylist = [int(a),int(b),int(c)]
mylist.sort()
print(sum(mylist[0:2]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-*- coding: utf-8
#  -*-
"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(p, q, r):
    # 3 -> 3 * 60 = 180
    # 4 -> 4 * 90 = 360
    # 5 -> 5 *
    # 360 / 5 = 180 - 72 = 108 = 54 * 2 * 5
    # (180 - (360 / 5)) * 5
    #p, q, r
    e = max(p, q, r)
    if e == p: return q + r
    elif e == q: return p + r
    elif e == r: return p + q
    else:
        assert(True)



do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    # k = int(parsed_lines[0][1])
    # S = parsed_lines[1][0]
    # return n, k, S
    return n


if not do_submit:
    n = input_parse("""
    3
    """)
    print(sol(n))

    n = input_parse("""
    100
    """)
    print(sol(n))

else:
    p, q, r= list(map(int, input().split()))
    # S = input().split()
    # print(sol(n, k, S))
    #n = int(input().strip())
    # S = input().strip()
    print(sol(p, q, r))

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, 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()))

ans = float('inf')

for i in range(3):
    for j in range(3):
        if i != j:
            if ans > a[i] + a[j]:
                ans = a[i] + a[j]

print(ans)

Submission status: Accepted

Solution code:
old_list=list(input().split())
new_list = sorted(old_list)
res=int(new_list[0])+int(new_list[1])
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = [P,Q,R]

N.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
  str = input()
  Time = sorted(list(map(int,str.split(" "))))
  print(Time[0] + Time[1])

Submission status: Accepted

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

ls.sort()
ls.pop()
print(sum(ls))

Submission status: Accepted

Solution code:
import itertools
p, q, r = (int(i) for i in input().split())  

comb = list(itertools.combinations([p, q, r], 2))
ans = min([sum(i) for i in comb])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    inputs = list(map(int, input().split()))
    inputs.remove(max(inputs))
    print(sum(inputs))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    p, q, r = [int(i) for i in input().split()]
    times = [p, q, r]
    print(sum(times) - max(times))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for i in range(3):
    min_time=min(p+q,r+q,p+r)
    

print(min_time)

Submission status: Accepted

Solution code:
li = []
x,y,z = map(int,input().split())
li.append(x)
li.append(y)
li.append(z)
li2 = sorted(li)
print(li2[0]+li2[1])

Submission status: Accepted

Solution code:
A,B,C =map(int,input().split())
print(min(A+B,A+C,B+C))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    p, q, r = map(int, input().split())
    ab = min(p, r+q)
    bc = min(q, p+r)
    ca = min(r, p+q)
    result = min(ab + bc, bc + ca, ca + ab)
    print(result)

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

ans = []
for i in range(3):
    for j in range(i+1,3):
        ans.append(li[i] + li[j])
print(min(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

out = min(P+Q,P+R,Q+R)

print(out)

Submission status: Accepted

Solution code:
a=[]
b=[]
for x in input().split():
	a.append(int(x))
    
b.append(a[0]+a[1])
b.append(a[2]+a[1])
b.append(a[0]+a[2])

b.sort()

print(b[0])

Submission status: Accepted

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

max_t=max(P,Q,R)

ans=P+Q+R-max_t
print(ans)

Submission status: Accepted

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

def SINGLE_INT(): return int(INPUT())
def MULTIPLE_INT_LIST(): return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): return map(int, INPUT().split())
def SINGLE_STRING(): return INPUT()
def MULTIPLE_STRING(): return INPUT().split()

arr = MULTIPLE_INT_LIST()
arr.sort()

print(sum(arr[:2]))

Submission status: Accepted

Solution code:
import itertools
P, Q, R = (int(i) for i in input().split())

d = {"AB": P, "BC": Q, "AC":R, "BA": P, "CB":Q, "CA":R}
min = P+Q+R
roots = itertools.permutations("ABC", 3)

for r in roots:
    sumtime = 0
    sumtime+= d[r[0]+r[1]]
    sumtime += d[r[1]+r[2]]
    if sumtime < min:
        min = sumtime

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:
import itertools
P, Q, R = tuple(map(int, input().split()))

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

Submission status: Accepted

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

abc = p + q
acb = r + q
bac = p + r

ans = [abc, acb, bac]

print(min(ans))

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math
import collections

P,Q,R = map(int, sys.stdin.readline().rstrip().split(" "))
print(min([P+Q, Q+R, R+P]))
exit(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t = input().split()
t.sort()
print(int(t[0])+int(t[1]))

Submission status: Accepted

Solution code:
# 2019 6/9
# ABC129 A Ariplane

if __name__ == '__main__':
    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())

m1=p;
m1=min(m1,q)
m1=min(m1,r)
if(m1==p):
        m2=min(q,r)
elif(m1==q):
        m2=min(p,r)
else:
        m2=min(p,q)

print(m1+m2)

Submission status: Accepted

Solution code:
inputs = [int(s) for s in input().split()]
p = inputs[0]
q = inputs[1]
r = inputs[2]

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

print(result)

Submission status: Accepted

Solution code:
def main():
  p, q, r = map(int, input().split())
  print(min(p+q, p+r, q+r))
 
if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))
m = max(l)
l.pop(l.index(m))
print(sum(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y,z = sorted(map(int, input().split()))
print(x + y)

Submission status: Accepted

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

for i in range(3):
    for j in range(3):
        if i != j:
            ans.append(l[i] + l[j])
        
print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
print(sum(sorted([p,q,r])[:2]))

Submission status: Accepted

Solution code:
print(sum(sorted([int(s) for s in input().split()])[: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:
n =list(map(int, input().split()))
n = sorted(n)
print(str(n[0] + n[1]))

Submission status: Accepted

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

time.sort()

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

Submission status: Accepted

Solution code:
aa =  [int(i) for i in input().split()]

bb = sorted(aa)

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

Submission status: Accepted

Solution code:
data = input().split()
data = sorted(data)
print(int(data[0])+int(data[1]))

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

def solve(a, b, c):
    return min(a+b, b+c, c+a)

if __name__ == '__main__':

    a, b, c = map(int, sys.stdin.readline().strip().split(" "))
    print solve(a, b, c)

Submission status: Accepted

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

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:
p, q, r = map(int, input().split())
print(p+q+r-max(p, q, r))

Submission status: Accepted

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

for i in P,Q,R:
    if(i > j):
        j = i
    

print(P+Q+R-j)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

List.sort()

result = List[0] + List[1]
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p,q,r = map(int,input().split())
ansum = sum([p,q,r])
answer = ansum - max([p,q,r])
print(answer)

Submission status: Accepted

Solution code:
A,B,C = [int(i) for i in input().split()]

r1 = A+B
r2 = B+C
r3 = C+A

s = [r1,r2,r3]
print(min(s))

Submission status: Accepted

Solution code:
l = sorted([int(x) for x in input().split()],reverse=True)
print(sum(l[1:]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

ls = list(map(int, input().split()))
a = min(ls)
del ls[ls.index(min(ls))]
b = min(ls)
print(a + b)

Submission status: Accepted

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

a = []

a.append(n[0] + n[1])
a.append(n[1]+n[2])
a.append(n[0]+n[2])
print(min(a))

Submission status: Accepted

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

a = list(map(int, input().split()))
a.sort(reverse=True)
print(sum(a[1:]))

Submission status: Accepted

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

Submission status: Accepted

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

li = []

li.append(P)
li.append(Q)
li.append(R)

li.remove(max(li))

print(sum(li))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# A,B = P
# B,C = Q
# C,A = R
P, Q, R = map(int, input().split())

result = min([ P + Q, Q + R, P + R, Q + R, R + P, R + P])
# 出力
print("{}".format(result))

Submission status: Accepted

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


def solve(p, q, r ):
    duration_list = [p, q, r]
    duration_list.sort()
    return sum(duration_list[:-1])


def main():
    p, q, r  = input_from_console()
    print(solve(p, q, r ))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()

Submission status: Accepted

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

min = p+q

if min > q + r:
    min = q+r
if min > p+ r:
    min = p+r
print(min)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    pqr = li()
    pqr.sort()
    print(pqr[0] + pqr[1])

Submission status: Accepted

Solution code:
PQR = list(map(int, input().split()))
PQR.pop(PQR.index(max(PQR)))
print(sum(PQR))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ab, bc, ca = map(int, input().split())

abc = ab + bc
acb = ca + bc
bac = ab + ca
bca = bc + ca
cab = ca + ab
cba = bc + ab

m = min([abc, acb, bac, bca, cab, cba])

print(m)

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())

route = sorted([P,Q,R])

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

Submission status: Accepted

Solution code:
# coding: utf-8

p, q, r = map(int, input().split())
a = [p, q, r];

a.sort()
print(a[0] + a[1])

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
A.sort()
ans = 0
for i in range(2):
  ans += A[i]
print(ans)

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
if p >= q and p >= r:
    print(q + r)
elif q >= p and q >= r:
    print(p + r)
else: print(p + q)

Submission status: Accepted

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

hoge = S.pop(S.index(min(S)))
fuga = S.pop(S.index(min(S)))

print(hoge + fuga)

Submission status: Accepted

Solution code:
lst = list(map(int, input().split()))
min1 = min(lst)
lst.remove(min1)
min2 = min(lst)
lst.remove(min2)
print(min1 + min2)

Submission status: Accepted

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

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:
P, Q, R = map(int, input().split())

m = max([P,Q,R])
print(P+Q+R-m)