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

Submission status: Accepted

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

if a<=b and a<=c:
	print(a)
elif b<=a and b<=c:
	print(b)
else:
	print(c)

Submission status: Accepted

Solution code:
# input 3 integers P,Q,R
P,Q,R = (int(x) for x in input().split())
# output the min of sum of 2 integers
print(min([P+Q, Q+R, R+P]))

Submission status: Accepted

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

nums.sort()

res = nums[0] + nums[1]

print(res)

Submission status: Accepted

Solution code:
def test():
    p = list(map(int,input().split()))
    result = 0

    for i in range(len(p)-1):
        result += min(p)
        p.remove(min(p))

    print(result)


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
D = list(map(int, input().split()))
s = sorted(D, key=int)
print(s[0] + s[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:
P,Q,R = map(int,input().split())
print(min(P+Q,min(P+R,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())
ans = []

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

print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

input = input().split()
# inputList = list(input[0])

a = int(input[0])
b = int(input[1])
c = int(input[2])

# inputList.sort()

list = [a+b, b+c ,c+a]

ans = min(list)
print(ans)



# flg = 1
# for i in range(0, len(inputList)-1):
#     if inputList[i] == inputList[i + 1]:
#         flg = 0
#         break
#
# if flg == 0:
#     print("Bad")
# else:
#     print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

cs=sorted(c)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    print(solve())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

def main(P, Q, R):
    total = P + Q + R
    ans = total - max(P, Q, R)
    return ans

if __name__ == '__main__':
    P, Q, R = list(map(int, input().split()))
    print(main(P, Q, R))

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(a)-max(a))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(n)-max(n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
I = input().split()
N = []
for i in range(len(I)):
  N.append(int(I[i]))
N.sort()
print(N[0] + N[1])

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

sum1 = sum - P
sum2 = sum - Q
sum3 = sum - R

answer = min(sum1, sum2, sum3)

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(a+b)

Submission status: Accepted

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

PQR.remove(max(PQR))
ans = sum(PQR)
print(ans)

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:

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

Submission status: Accepted

Solution code:
# 2^3 = 6 だけど片道なので /2 = 3通り

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

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

Submission status: Accepted

Solution code:
#coding : utf-8　

import os
import sys

P, Q, R = map(lambda x: int(x), input().split(" "))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P, Q, R = (int(_) for _ in input().split())
a = min(P + Q, Q + R, R + P)
print(a)

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:
S = input()

S = list(map(int, S.split()))

S.sort()

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

Submission status: Accepted

Solution code:
a, b, c = [int(i) for i in input().split()]
d = a + b
e = b + c
f = c + a
print(min(d, e, f))

Submission status: Accepted

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
 # ABC129, A - airplane
p, q, r = [int(el) for el in input().split(' ')]
print(p+q+r-max(p,q,r))

Submission status: Accepted

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

LEN = 3
abc_sum = 0
for i in range(len(num_list) - 1):
  abc_sum += num_list[i]

bca_sum = 0
reversed_list = list(reversed(num_list))
for i, num in enumerate(reversed_list, 1):
  if i == LEN:
    break
  bca_sum += num

cab_sum = 0
cab_sum += num_list[-1]
cab_sum += num_list[0]

l = [abc_sum, bca_sum, cab_sum]

print(min(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

time.sort()

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

Submission status: Accepted

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

l = list()
cost = list()

l.append(a)
l.append(b)
l.append(c)

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

print( min(cost) )

Submission status: Accepted

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

Submission status: Accepted

Solution code:


p, q ,r = [int(x) for x in input().split()]
max_length = max(p,q,r)
if max_length == p:
    print(q+r)
elif max_length == q:
    print(p+r)
else:
    print(p+q)

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

Submission status: Accepted

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

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:
s = list(map(int,input().split()))
lst = []
for i in s:
  a = sum(s) - i
  lst.append(a)
print(min(lst))

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

kotae=sum(x)-max(x)
print(kotae)

Submission status: Accepted

Solution code:
data = list(map(int, input().split()))
n = len(data)
res = 300
for i in range(n-1):
  for j in range(i+1, n):
    if data[i] + data[j] < res:
      res = data[i] + data[j]
print(res)

Submission status: Accepted

Solution code:
p,q,r = map(str,input().split())
x =int(p)+int(q)
y = int(p)+int(r)
z = int(r)+int(q)
l = []
l.append(x)
l.append(y)
l.append(z)

print(min(l))

Submission status: Accepted

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

A = lst[0] + lst[1]
B = lst[1] + lst[2]
C = lst[0] + lst[2]

print(min([A,B,C]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
a = list(map(int, input().split()))
b = list(itertools.permutations(a, 2))
ans = 201
for i in b:
    ans = min(ans, (i[0]+i[1]))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [ int(i) for i in input().split()]
b = []
for i in range(3):
    b.append(a[i-1]+a[i])
print(min(b))

Submission status: Accepted

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

pqr.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(inputs) - max(inputs))

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

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

Submission status: Accepted

Solution code:
N=list(map(int,input().split()))
ans=[]
for i in range(len(N)-1):
  for j in range(i+1, len(N)):
    A=N[i]+N[j]
    ans.append(A)
    
print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main17():
    data = input().split()
    num = []
    for i in range(3):
        num.append(int(data[i]))
    num2 = []
    num2.append((num[0]+num[1]))
    num2.append((num[0]+num[2]))
    num2.append((num[2]+num[1]))
    print((min(num2)))

if __name__ == "__main__":
    main17()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

# S = list(input())
# n = int(input())
p, q, r = list(map(int, input().split()))
# a = list(map(int, input().split()))
# S = [list(map(int, input().split())) for i in range(n)]

s = p + q + r
print(s - 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:
def A_Airplane():
    time_list = list(map(int, input().split()))
    time_max = max(time_list)
    time_list.remove(time_max)
    print(sum(time_list))

if __name__ == "__main__":
    A_Airplane()

Submission status: Accepted

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

print(sum(seq) - seq[0])

Submission status: Accepted

Solution code:
#coding:utf-8
flight = list(map(int, input().split()))
flight.sort()

#最小飛行時間を求めるので、飛行時間が短い順に並べて上位2つを足す
print(sum(flight[0:2]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
*A,=map(int,input().split());print(sum(A)-max(A))

Submission status: Accepted

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

sum =[]
sum.append(p+q)
sum.append(p+r)
sum.append(r+q)

print(min(sum))

Submission status: Accepted

Solution code:
p = list(map(int,input().split()))
l=[p[i]+p[j] for i in range(3) for j in range(i+1,3)]
print(min(l))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(sum1-max1)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(sum(d)-max(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())
 
#print(P,Q,R)
 
X=[P,Q,R]
Y=[]
for i in range(0,2):
    for j in range(i+1,3):
       # print(i,j)
        Y.append(X[i]+X[j])
#for j in range(2,3):
 #   print("j",j)
 
#print(range(2,2))
print(min(Y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A_B=P,B_C=Q,C_A=R

A_B, B_C, C_A = (int(a) for a in input().split())

ans = (A_B + B_C + C_A) - max(A_B, B_C, C_A)
print(ans)

Submission status: Accepted

Solution code:
get = input().split()
P = int(get[0])
Q = int(get[1])
R = int(get[2])

A = P + Q
B = P + R
C = Q + R

print(min(A, B, C))

Submission status: Accepted

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

num = [int(i) for i in num]
num_fix = sorted(num)
print(num_fix[0]+num_fix[1])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a,b,c = LI()
    ans = 10 ** 5
    ans = min(ans, a + b)
    ans = min(ans, a + c)
    ans = min(ans, c + b)
    print(ans)
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
x =  [int(s) for s in input().split()]
min = x[0] + x[1]
for s in range(len(x)):
    if(s != len(x)-1):
        if(x[s] + x[s+1] < min):
            min = x[s] + x[s+1]
    elif(s == len(x)-1):
        if(x[s] + x[0] < min):
            min = x[s] + x[0]
    
print(min)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
logging.disable(logging.CRITICAL)

P, Q, R = (int(x) for x in input().split())
l_time =[P + Q, P + R, Q + R]

print(min(l_time))

Submission status: Accepted

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

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

ans=P+Q+R-max(ini)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def main():
	v = list(map(int, input().strip().split()))
	v.sort()
	print(v[0]+v[1])

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
p, q, r =(int(i) for i in input().split())
ans1=p+q
ans2=q+r
ans3=p+r

if ans1<=ans2 and ans1<=ans3:
    print(ans1)
elif ans2<= ans1 and ans2 <= ans3:
    print(ans2)
else:
    print(ans3)

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

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

Submission status: Accepted

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

Submission status: Accepted

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


min_dist = 999
for i in range(len(l) - 1):
    for j in range(i + 1, len(l)):
        if l[i] + l[j] < min_dist:
            min_dist = l[i] + l[j]
print(min_dist)

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:
s=input().split()
p=int(s[0])
q=int(s[1])
r=int(s[2])
air=[p,q,r]
mn1=min(air)
air.remove(mn1)
mn2=min(air)
print(mn1+mn2)

Submission status: Accepted

Solution code:
import itertools

a = list(map(int, input().split()))
b = sum(a)
for i in itertools.permutations(a, 2):
    b = min(b, i[0] + i[1])
print(b)

Submission status: Accepted

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

i.sort();

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

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

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

print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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 = [int(x) for x in input().split(" ")]

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

Submission status: Accepted

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

# In[2]:


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


# In[3]:


t = [P, Q, R]
print(sum(t)-max(t))


# In[ ]:

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:
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())
print(min(q+p,q+r,p+r))

Submission status: Accepted

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

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()))
L.sort()
print(L[0]+L[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

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())
time_list = [(p+q), (q+r), (r+p)]
time_list.sort()
print(time_list[0])

Submission status: Accepted

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

min = p + q
if min > r + q:
    min = r + q

if min > p + r:
    min = p + r

print(min)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input().split()
if int(n[0])+int(n[1]) <= int(n[1])+int(n[2]):
  if int(n[0])+int(n[1]) <= int(n[2])+int(n[0]):
    print(int(n[0])+int(n[1]))
  else:
    print(int(n[2])+int(n[0]))
else:
  if int(n[1])+int(n[2]) <= int(n[2])+int(n[0]):
    print(int(n[1])+int(n[2]))
  else:
    print(int(n[2])+int(n[0]))

Submission status: Accepted

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

time.remove(max(time))

print(sum(time))

Submission status: Accepted

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

line = [p + q, p + r, q + r]

line = sorted(line)

print(line[0])

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())
a = p+q
b = q+r
c = p+r
print(min(a,b,c))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
P,Q,R = [int(i) for i in input().split()]
if P+Q <= Q+R and P+Q <= P+R:
    print(P+Q)
elif Q+R <= P+Q and Q+R <= P+R:
    print(Q+R)
elif P+R <= Q+R and P+R <= P+Q:
    print(P+R)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = [int(i) for i in input().split()]
a.sort()
print(a[0]+a[1])

Submission status: Accepted

Solution code:
p,q,r = map(int,input().split())
print(q+p+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()))
b = 0
for i in range(len(a)):
    for j in range(len(a)):
        if i != j:
            if b == 0:
                b = a[i] + a[j]
            else:
                b = min(b, a[i] + a[j])
print(b)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R = list(map(int,input().split()))
ABC=P+Q
ACB=R+Q
BAC=P+R
BCA=Q+R
CAB=R+P
CBA=Q+P
print(min([ABC,ACB,BAC,BCA,CAB,CBA]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def Seekmin(x,y,z):
  min = x + y
  if x+y <= y+z and x+y <= x+z:
    return x+y
  elif x+y >= y+z and z+y <= x+z:
    return y+z
  else:
    return x+z
  
print(Seekmin(x,y,z))