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:
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=map(int,input().split())
pqr=[p,q,r]
pqr.sort()
print(pqr[0]+pqr[1])

Submission status: Accepted

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

arr.sort()

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

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
*a, b = sorted(map(int, input().split()))
print(sum(a))

Submission status: Accepted

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

heapq.heapify(l)
print(heapq.heappop(l) + heapq.heappop(l))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

lis.sort()
print(lis[0] + lis[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:
P,Q,R=map(int,input().split());print(min(P+Q,Q+R,R+P))

Submission status: Accepted

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

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:
P, Q, R = map(int,input().split())
min = 1000
AC = P + Q
BA = R + P
AB = R + Q
if AC < min:
    min = AC
if BA < min:
    min = BA
if AB < min:
    min = AB
print(min)

Submission status: Accepted

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

print(sum(time) - max(time))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
s1 = a + b
s2 = b + c
s3 = c + a

if s1 <= s2:
  if s1 <= s3:
    print(s1)
  elif s3 <= s1:
    print(s3)
elif s2 <= s1:
  if s2 <= s3:
    print(s2)
  elif s3 <= s2:
    print(s3)

Submission status: Accepted

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

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

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

print(ans)

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())
maxi=max(p,q,r)
print(p+q+r-maxi)

Submission status: Accepted

Solution code:
from sys import stdin

li = list(map(int,stdin.readline().rstrip().split()))

li.sort()

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

Submission status: Accepted

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

print(min(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

list = sorted(list)

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

Submission status: Accepted

Solution code:
#23:39
a = list(map(int,input().split()))
print(sum(a) - max(a))

Submission status: Accepted

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

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

print(min(x, y, z))

Submission status: Accepted

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

Submission status: Accepted

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

list = [P, Q, R]
min1 = min(list)
list.remove(min1)
min2 = min(list)
print(min1 + min2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R=[int(s) for s in input().split() ]
print(min([P+Q,Q+R,R+P]))

Submission status: Accepted

Solution code:
# ABC129A - Airplane
def main():
    *A, = map(int, open(0).read().split())
    ans = sum(A) - max(A)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import exit, stderr, stdin
input = stdin.readline
# setrecursionlimit(10**7)

def debug(var, name="hoge"):
    print(str(type(var)) + name +":" + " = " + repr(var), file=stderr)
    return


def main():
    A, B, C = sorted(list(map(int,input().split())))
    print(A+B)
    # N = int(input())
    # a = [int(input()) for _ in range(N)]
    # S = str(input())[:-1]
    # print(S)
    # L = len(S)
    # INF = 10000000002
    # EPS = 1e-9
    # exit()


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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())
cost = [P + Q, R + Q, R + P]
print(min(cost))

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

Submission status: Accepted

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

ans = [p+q, q+r, p+r]
print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC129A - Airplane
s = list(map(int,input().split()))
print(sum(s)-max(s))

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:
l = list(map(int, input().split()))
print(sum(l)-max(l))

Submission status: Accepted

Solution code:
import itertools

n = map(int, input().split())
ns = list(itertools.combinations(n,2))
num = list()

for i in ns:
  num.append(i[0] + i[1])
print(min(num))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t = list(map(int, input().split()))
t.sort()
del t[-1]
print(sum(t))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R=[int(x) for x in input().split()]
print(min(P+Q,Q+R,R+P))

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

Submission status: Accepted

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

sum_times = sum(times)
max_time = 0
for i in range(len(times)):
    if max_time < times[i]:
        max_time = times[i]
print(sum_times - max_time)

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:
t = list(map(int, input().split()))
# t = [1, 3, 4]
ans = t[0] + t[1]
for i in range(3):
    for j in range(3):
        if i == j:
            continue
        ans = min(t[i] + t[j], ans)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split()) #A->B=P, B->C=Q, C->A=R 
import itertools
ans = min(map(sum,list(itertools.combinations([P,Q,R], 2))))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

sorted_hour = sorted(hour)
#print(sorted_hour)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
p, q, r = map(int, input().split())
print (min(p+q, q+r, r+p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print ( lst[0] + lst[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:
a = list(map(int, input().split()))
print(sum(a)-max(a))

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

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())
X = [P, Q, R]
X.sort()
X.pop()
print(sum(X))

Submission status: Accepted

Solution code:
def main(): 
    
    P = sorted(map(int, input().split()))

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/home/ryo/.pyenv/versions/anaconda3-2019.03/envs/hoge/bin/python

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

Submission status: Accepted

Solution code:
r_l=list(map(int,input().split()))
 
min_r=1000

for i in range(3):
  for j in range(i+1,3,1):
    min_r=min(r_l[i]+r_l[j],min_r)

print(min_r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

time_list = []
time_list.append(list[0] + list[1])
time_list.append(list[2] + list[1])
time_list.append(list[0] + list[2])
print(min(time_list))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(min(list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p, q, r = (int(x) for x in input().split(' '))

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations
import sys
import string


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LIM(): return list(map(lambda x:int(x) - 1, sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def LIRM(n): return [LIM() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
mod = 1000000007


a, b, c = LI()
print(min([i + j for i, j in list(combinations([a, b, c], 2))]))

Submission status: Accepted

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

total=int(S[0])+int(S[1])
print(total)

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
w = l
res = 200
for i in range(len(l)):
    for j in range(len(l)):
        if l[i] + l[j] < res and i != j:
            res = l[i] + l[j]
print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

a,b,c=x[0],x[1],x[2]

sumaA_B = a+b
sumaA_C = a+c
sumaB_C = b+c

r1 = min(sumaA_B,sumaA_C)
rt = min(r1,sumaB_C)

print(rt)

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:
from sys import stdin

p, q, r = [int(x) for x in stdin.readline().rstrip().split()]
print(min(p+q, p+r, q+r))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x = input().split()
P = int(x[0])
Q = int(x[1])
R = int(x[2])
l = [P+Q,Q+R,R+P]
print(min(l))

Submission status: Accepted

Solution code:
import itertools

while True:
    try:
        P, Q, R = map(int, input().split())
        
        print(min([sum(c) for c in itertools.combinations([P, Q, R], 2)]))
        
    except:
        break

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

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:
PQR = list(map(int, input().split()))
PQR.sort()
print(int(sum(PQR[:2])))

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:
l=list(map(int,input().split()))
p=l[0]
q=l[1]
r=l[2]
print(min(p+q,p+r,q+r))

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

# solution
res = min(P+Q, P+R, Q+R)

# output
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

list_.sort()

ans = sum(list_[:2])

print(ans)

Submission status: Accepted

Solution code:
p = list(map(int, input().split()))
print(p[0] + p[1] + p[2] - max(p))

Submission status: Accepted

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

print(sum(m)-max(m))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(min(path_list))

Submission status: Accepted

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

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

max = p
if max < q:
    max = q
if max < r:
    max = r
print(p+q+r-max)

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

Submission status: Accepted

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

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())
list_ = sorted([P,Q,R])
print(sum(list_[:2]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
res = input().split()
map(int, res)
q = res
cand = []
while len(q) > 0:
    now = q[0]
    q.pop(0)
    b = [x for i, x in enumerate(res) if i != now]
    for i in range(len(b)):
        cand.append(int(now) + int(b[i]))
print(min(cand))

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:
res = input().split()
map(int, res)
q = res
cand = []
while len(q) > 0:
    now = q[0]
    q.pop(0)
    b = [x for i, x in enumerate(res) if i != now]
    for i in range(len(b)):
        cand.append(int(now) + int(b[i]))
print(min(cand))

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:
L  = sorted(list(map(int, input().split())))
print (sum(L[:2]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = []
x.append(P)
x.append(Q)
x.append(R)
x.sort()
print(x[0] + x[1])

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
sum = 0
max = 0
for i in range(3) :
  sum += l[i]
  if max <= l[i] :
    max = l[i]
print(sum - max)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
list=[a,b,c]
list.sort()
print(list[0]+list[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:
r=sorted(list(map(int,input().split())))
print(r[0]+r[1])

Submission status: Accepted

Solution code:
P,Q,R = (int(a) for a in input().split())
if P<Q:
    if Q<R:
        print(P+Q)
    else:
        print(P+R)
else:
    if P<R:
        print(P+Q)
    else:
        print(Q+R)

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:
#!/usr/bin/env python3
import sys


def solve(P: int, Q: int, R: int):
    a = sorted([P, Q, R])
    print(a[0] + a[1])
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(P, Q, R)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
a = input().split()
p, q, r = map(lambda x: int(x), a)
print(np.min([p+q, q+r, r+p]))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
p,q,r = map(int,input().split())
print(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,p+r))

Submission status: Accepted

Solution code:
p = sorted(map(int, input().split()))
p.pop()
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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=[int(i) for i in input().split()]
print(min(p+q,q+r,p+r))

Submission status: Accepted

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

Submission status: Accepted

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

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

resolve()

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:
temp=list(map(int, input().split()))

print(sum(temp)-max(temp))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
time = list(map(int, input().split()))
sum = sum(time)
ans = [0] * 3

for i in range(3):
    ans[i] = sum - time[i]
print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
d=a+b
e=b+c
f=c+a
list={d,e,f}
print(min(list))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
print(sum(sorted(list(map(int,input().split())))[:-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:
P, Q, R = map(int, input().split()) 
tt= [P+Q, Q+R, P+R]
min_tt = min(tt)
print(min_tt)

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

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:
t = list(map(int, input().split()))
print(sum(t) - max(t))

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    p,q,r = map(int, input().split())
    
    answer = min(p+q,q+r,r+p)
    print(answer)
    
    
main()

Submission status: Accepted

Solution code:
p, q ,r = map(int, input().split())
if 1 <= p <= 100 and 1 <= q <= 100 and 1 <= r <= 100:
    print(min(p+q, p+r, q+r))
else:
    print('Invalid value')

Submission status: Accepted

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

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

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

res = P + Q + R - max(P, Q, R)

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

# print(p,q,r)

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

print(min(a,b,c))

Submission status: Accepted

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

P = inputNum[0]
Q = inputNum[1]
R = inputNum[2]

# 飛行時間の和の候補から比較して求める
candidacy1 = P + Q
candidacy2 = R + Q
candidacy3 = P + R

result = candidacy1
if result > candidacy2:
    result = candidacy2

if result > candidacy3:
    result = candidacy3

print(result)

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
pq=p+q
qr=q+r
rp=r+p
lis=[pq,qr,rp]
lis.sort()
print(lis[0])

Submission status: Accepted

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

ans = sum(cost_list) - max(cost_list)
print(ans)

Submission status: Accepted

Solution code:
li = list(map(int, input().split()))
li.sort()
print(li[0] + li[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:
# 3空港間の距離
p, q, r = map(int, input().split())

# 最短時間の表示
print(min([p+q, q+r, r+p]))

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

Submission status: Accepted

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

r1 = p + q
r2 = q + r
r3 = p + r

print(min(r1, r2, r3))

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:
l = list(map(int,input().split()))
p = l[0]
q = l[1]
r = l[2]
print(min(p+q,q+r,r+p))

Submission status: Accepted

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

Submission status: Accepted

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

s = [a,b,c]

s = sorted(s)

print(s[0] + s[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:
#!/usr/bin/env python3
import sys


def solve(P: int, Q: int, R: int):
    print(min(P + Q, Q + R, R + P))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(P, Q, R)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print (min(n1+n2,n3+n2, n1+n3))

Submission status: Accepted

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

Submission status: Accepted

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

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

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, b, c = map(int, input().split())
print(min(a + b, b + c, c + a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = [int(i) for i in input().split()]
print(min([num[0] + num[1], num[1] + num[2], num[2] + num[0]]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

# print(P)
# print(Q)
# print(R)

pqr = sorted(pqr)

# print(pqr)

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

Submission status: Accepted

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