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

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
lst = [p,q,r]
ans = sum(lst)
for i in range(3):
    for j in range(i+1, 3):
        if lst[i] + lst[j] < ans:
            ans = lst[i] + lst[j]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

M = l.index(max(l))

print(l[0]+l[1]+l[2]-l[M])

Submission status: Accepted

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

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

mini = 0

if a < b:
    mini = a
else:
    mini = b

if c < mini:
    mini = c

print(mini)

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())
T = []
T.append(P)
T.append(Q)
T.append(R)
T.sort()
print(T[0] + T[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#aをリストして入力値を受け取ります
a = list(map(int,input().split()))
#aをソートします
a.sort()
#昇順でソートしたものの2つを足す
print(a[0] + a[1])

Submission status: Accepted

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

max_time = max(X)
sum_time = sum(X)
MinSumTime = sum_time-max_time
print(MinSumTime)

Submission status: Accepted

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

Submission status: Accepted

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

min_dis = 0

min_dis = P + Q

tmp = R + Q
if min_dis > tmp:
    min_dis = tmp

tmp1 = P + R
if min_dis > tmp1:
    min_dis = tmp1

print(min_dis)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ls = [ x for x in map(int, input().split(' ')) ]
ls = sorted(ls)
print(ls[0] + ls[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=[int(i) for i in input().split()]
print(sum(A)-max(A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(m)

Submission status: Accepted

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

PQR.sort()

print(sum(PQR[:2]))

Submission status: Accepted

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

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

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

print(min)

Submission status: Accepted

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

Submission status: Accepted

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

d.append(a + b)
d.append(b + c)
d.append(c + a)

print(min(d))

Submission status: Accepted

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

a = P + Q
b = P + R
c = Q + R
d = [a,b,c]

print(min(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

m=max(l_)
l_.remove(m)
print(sum(l_))

Submission status: Accepted

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

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

m = 10e9

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

print(m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p,q,r=map(int, input().split())
N=[p,q,r]
N.sort()
print (N[0]+N[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:
P,Q,R = map(int,input().split())
sum = P+Q+R
max = max([P,Q,R])
print(sum-max)

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

ans = min (abs(A+B), abs(B+C), abs(C+A))
print(ans)

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


B =[A[0]+A[1],A[0]+A[2],A[1]+A[2]]
tmp = B[0]
for i in range(len(B)):
    if tmp>=B[i]:
        tmp = B[i]


print(tmp)

Submission status: Accepted

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

pq = p + q
pr = p + r
qr = q + r

answer = min(pq, pr, qr)

print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

mintime = p + q
if(mintime > p + r):
    mintime = p + r
if(mintime > q + r):
    mintime = q + r

print(mintime)

Submission status: Accepted

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

mintime = p + q + r - max(p,q,r)

print(mintime)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_time = list(map(int, input().split()))
sum_time_l = 200
for i in range(3):

    if i + 1 == 3:
        sum_time = input_time[i] + input_time[0]
    else:
        sum_time = input_time[i] + input_time[i + 1]
    if sum_time_l > sum_time:
        sum_time_l = sum_time

print(sum_time_l)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(' '))
time = []
time.append(p+q)
time.append(q+r)
time.append(r+p)
print(min(time))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit

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

M = max(P, Q, R)

print(P + Q + R - M)

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:
# 2019/06/11
# AtCoder Beginner Contest 129 - A

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

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

# Output 
print(mind)

Submission status: Accepted

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

Submission status: Accepted

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


abc()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    A = list(map(int, input().split()))
    A.sort()
    print(sum(A[0: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:
P, Q, R = map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

resolve()

Submission status: Accepted

Solution code:
ab, bc, ca = [int(x) for x in input().split()]
print( (ab + bc + ca) - max(ab, bc, ca) )

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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 = sorted([int(_) for _ in input().split()])
print(P + Q)

Submission status: Accepted

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

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

print(min(times))

Submission status: Accepted

Solution code:
#A

p = [int(x) for x in input().split()]

p = sorted(p)

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

Submission status: Accepted

Solution code:
P,Q,R = map(int,input().split())
a1 = P + Q
a2 = P + R
a3 = Q + R
value = 300
if a1 < value:
    value = a1
if value > a2:
    value = a2
if value > a3:
    value = a3
print(value)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(i) for i in input().split()]
list=[]
S1 = a[0]+a[1]
S2 = a[1]+a[2]
S3 = a[2]+a[0]
list.append(S1)
list.append(S2)
list.append(S3)

print(min(list))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
dist = [int(inp) for inp in input().rstrip().split()]

print(sum(dist) - max(dist))

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

print ( ans)

Submission status: Accepted

Solution code:
def calc(P,Q,R):
  sum1=P+Q
  sum2=Q+R
  sum3=R+P
  return min(sum1,sum2,sum3)

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

Submission status: Accepted

Solution code:
import numpy as np
p,q,r = map(int,input().split())
print(p+q+r-np.max([p,q,r]))

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:
tmp0 = input()
P, Q, R = tmp0.split(" ")
del tmp0
P, Q, R = int(P), int(Q), int(R)
print(min(P+Q, Q+R, R+P))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np
words = lambda t : list(map(t, input().split()))
pqr = words(int)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(i) for i in input().split()]
a.sort()
ans = a[0] + a[1]
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問題
p = list(map(int,input().split()))
p.sort()
print(p[0]+p[1])

Submission status: Accepted

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

print(sum(data[:2]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

timed=sorted(time)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inp = input().split()
p = int(inp[0])
q = int(inp[1])
r = int(inp[2])

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

Submission status: Accepted

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

print(sum(X) - max(X))

Submission status: Accepted

Solution code:
import math
import sys
import numpy
p = list(map(int,input().split()))
ans = sum(p)-max(p)
print(ans)

Submission status: Accepted

Solution code:
hour = sorted(list(map(int,input().split())))
print(sum(hour[: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 = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
times = [P, Q, R]
from itertools import combinations
 
min_ = 200
for i in combinations(times, r=2):
  j = sum(i)
  if j < min_:
    min_ = j
print(min_)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
InText = input()

FS = InText.find(" ")

SS = InText.find(" ",FS+1)

P = int(InText[0:FS])
Q = int(InText[FS+1:SS])
R = int(InText[SS+1:])

Airports = [P,Q,R]

Airports.sort()

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

Submission status: Accepted

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


ABC = p + q
BCA = q + r
CAB = r + p

min = ABC
if min > BCA:
  min = BCA
  
if min > CAB:
  min = CAB

print(min)

Submission status: Accepted

Solution code:
p_q_r=input().split()
p_q_r=[int(p_q_r[i]) for i in range(3)]
p_q_r.sort()
print(p_q_r[0]+p_q_r[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:
import statistics
root = list(map(int, input().split()))
a = min(root)
b = statistics.median(root)
print(a + b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
	flight_time = sorted(map(int, input().split()))
	print(flight_time[0] + flight_time[1])

if __name__ == "__main__":
	main()

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

Submission status: Accepted

Solution code:

AIR_PORTS = ['A', 'B', 'C']


def get_input():
    PandQandR = input().split(" ")
    P = int(PandQandR[0])
    Q = int(PandQandR[1])
    R = int(PandQandR[2])
    return P, Q, R


def calc_flight_time(flight_time_list):
    min = 500
    for i, time_1 in enumerate(flight_time_list):
        for j, time_2 in enumerate(flight_time_list):
            if i == j:
                continue
            result_time = time_1 + time_2
            if min > result_time:
                min = result_time
    return min


def main():
    P, Q, R = get_input()
    flight_time_list = [P, Q, R]
    result_time = calc_flight_time(flight_time_list)
    print(result_time)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A
# Airplane

P_Q_R = input()

P = int(P_Q_R.split(" ")[0])
Q = int(P_Q_R.split(" ")[1])
R = int(P_Q_R.split(" ")[2])

PQR =[P, Q, R]

import numpy as np

print(np.sum(PQR) - np.max(PQR))

Submission status: Accepted

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

print(sum(pqr[0:2:]))

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:
air = input().split()
air = [int(i) for i in air]
air_min = min([air[0] + air[1], air[1] + air[2], air[0] + air[2]])
print(air_min)

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

#P=AB Q=BC R=AC
#ABC ACB BAC BCA CAB CBA

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


a=sorted(list)

print(a[0])

Submission status: Accepted

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

m=sorted(l)[:2]

n=sum(m)
print(n)

Submission status: Accepted

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

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

Submission status: Accepted

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

tmp = [p,q,r]

tmp.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(len(lst_A)):
	lst_A[i] = int(lst_A[i])
  
lst_A.sort()

ans = lst_A[0] + lst_A[1]

print(ans)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))


def main():
    a = LI()

    return sum(a) - max(a)


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum_hour.append(P+Q)
sum_hour.append(P+R)
sum_hour.append(R+Q)
ans_hour=min(sum_hour)
print(ans_hour)

Submission status: Accepted

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

abc = int(pqr[0]) + int(pqr[1])
bca = int(pqr[1]) + int(pqr[2])
cab = int(pqr[2]) + int(pqr[0])

print(min(abc, bca, cab))

Submission status: Accepted

Solution code:
import bisect

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




if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R=input().split()
P,Q,R=int(P),int(Q),int(R)
n=[P,Q,R]
lst=sorted(n)
print(sum(lst[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:
def smaller(x, y):
	if x < y: return x
	return y

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def airplane(P: int, Q: int, R: int)->int:
    return min(P+Q, Q+R, R+P)


if __name__ == "__main__":
    P, Q, R = map(int, input().split())

    ans = airplane(P, Q, R)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
     air = list(map(int, input().split()))
     air.remove(max(air))
     print(sum(air))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-----------にゃんにゃん準備-----------#
def nyan(f=lambda x: x): return map(f,input().split())
#------------にゃんにゃん------------#
a,b,c = nyan(int)
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, P + R))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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,P+R))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
p, q, r = [int(elem) for elem in input().split()]
lst = [p, q, r]
lst = sorted(lst)
print(sum(lst[0:2]))

Submission status: Accepted

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

print(sum(X) - max(X))

Submission status: Accepted

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

m = sum(lis)
l = len(lis)

for j in range(l):
  for k in range(l):
    if k <= j:
      continue
    tmp = lis[j]+lis[k]
    if tmp < m:
      m = tmp
      
print(m)

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:
# -*- coding: utf-8 -*-


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

print(min)

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

Submission status: Accepted

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

import sys
import copy

sys.setrecursionlimit(1000000)

# input = sys.stdin.readline

# ~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

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

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

Submission status: Accepted

Solution code:
P,Q,R = map(int, input().split())
if P+Q<=Q+R:
    if P+Q<=R+P:
        print(P+Q)
    else:
        print(R+P)
elif Q+R<P+Q:
    if Q+R<=R+P:
        print(Q+R)
    else:
        print(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:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ts = [int(i) for i in input().split(" ")]

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

Submission status: Accepted

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

# A, B, C 
# A, C, B 
# B, A, C 
# B, C, A 
# C, A, B 
# C, B, A

print(min([sum(i) for i in (list(itertools.combinations([P, Q, R],2)))]))

Submission status: Accepted

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

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

print("{}".format(ans))

Submission status: Accepted

Solution code:
da=list(map(int,input().split()))
x=-max(da)
for i in da:
    x+=i
print(x)

Submission status: Accepted

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

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

Submission status: Accepted

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

a = n[0] + n[1]
b = n[0] + n[2]
c = n[1] + n[2]

print(min(a,b,c))

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

Submission status: Accepted

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

dists.pop()
print(sum(dists))

Submission status: Accepted

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

Submission status: Accepted

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


p,q,r=spaceinput()

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