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:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]#HeightString
def mi(n): return [wi() for _ in range(n)]#MatrixInt
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

p, q, r = wi()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  a,b,c=LI()

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

print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p,q,r = map(int,input().split())
m = p + q + r
a = p + q
b = r + q
c = p + r
if a < m:
    m = a
if b < m:
    m = b
if c < m:
    m = c

print(m)

Submission status: Accepted

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

A = P+Q
B = R+Q
C = P+R
D = Q+R
E = Q+P
F = R+P

num = [A, B, C, D, E, F]
print(min(num))

Submission status: Accepted

Solution code:
from collections import Counter as D, defaultdict as dd
from math import factorial as ft, ceil as aron, log
from fractions import gcd as pg 
from bisect import insort as ins, bisect_left as bl, bisect_right as br
import sys

#sys.stdin=open("./testfile1.py","r")
raw_input=sys.stdin.readline

f1=lambda : map(int,raw_input().split())
f2=lambda : map(int,list(raw_input()))
f3=lambda : int(raw_input())
f4=lambda : raw_input().rstrip()
f5=lambda : raw_input().split()


def main():
    a=f1()
    a.sort()
    print sum(a[:2])
    


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#S=input()

#print(ans)



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

ans=min(lis[0]+lis[1],lis[1]+lis[2],lis[2]+lis[0])

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if p<=r :
    if q<=r:
        print(p+q)
    else:
        print(p+r)
elif p>r:
    if q<=p:
        print(r+q)
    else:
        print(p+r)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

P,Q,R = inpl()

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

Submission status: Accepted

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

Ans1 = P + Q
Ans2 = Q + R
Ans3 = R + P

if(Ans1 > Ans2):
	Ans1 = Ans2

if(Ans1 > Ans3):
	Ans1 = Ans3

print (Ans1)

Submission status: Accepted

Solution code:
import sys
data = sys.stdin.readlines()
inputs = [int(x) for x in data[0].split()]
inputs.sort()
print(inputs[0] + inputs[1])

Submission status: Accepted

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

times.sort()

print(times[0] + times[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:
from sys import stdin
l = stdin.readline().rstrip().split()
l.sort()
saitan = int(l[0]) + int(l[1])
print(saitan)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
li = list(map(int, input().split()))
m = min(li)
li.remove(m)
print(m + min(li))

Submission status: Accepted

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

m = max(dist)
dist.remove(m)


print(sum(dist))

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:
F, S, T = map(int, input().split())
FS = F + S
ST = S + T
TF = T + F
L = [FS, ST, TF]
print(min(L))

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

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(q+p)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int, raw_input().split())
if a >=b and a>=c:
  print b+c
elif b>=a and b>=c:
  print a+c
else:
  print a+b

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
#print(p,q,r)
d=p+q
e=q+r
f=r+p
if d>f and e>f:
    print(f)
elif f>d and e>d:
    print(d)
elif f>e and d>e:
    print(e)
elif d==e or f==d:
    print(d)
elif e==f:
    print(e)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R=map(int, input().split())
PQ=P+Q
PR=P+R
QR=Q+R
QP=Q+P
RP=R+P
RQ=R+Q
print(min(PQ,QR,QR,QP,RP,RQ))

Submission status: Accepted

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

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:
a, b, c= (int(i) for i in input().split()) 

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
p, q, r = map(int, input().split())
# 文字列の入力
#s = input()
if p>=q and r>=q:
	a=q
	if p>r:
		b=r
	else:
		b=p

elif q>=p and r>=p:
	a=p
	if q>r:
		b=r
	else:
		b=q
		
else:
	a=r
	if q>p:
		b=p
	else:
		b=q


# 出力
print("{}".format(a+b))

Submission status: Accepted

Solution code:
import copy

params = list(map(int, input().split()))
count = len(params)

minTime = 500

for i in range(count):
  pattern = copy.copy(params)
  total = 0
  pattern.pop(i)
  for j in range(len(pattern)):
      total = params[i]+pattern[j]
      if total <= minTime:
          minTime = total

print(minTime)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    P = [int(i) for i in input().split()]
    min = P[0] + P[1]
    for n, i in enumerate(P):
        for m, j in enumerate(P):
            if n != m and min > i + j:
                min = i + j
    print(min)

Submission status: Accepted

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

place = ['a','b','c']
time = list(map(int, input().split()))
dict = dict(zip(place,time))
time_list = []
for k1, v1 in dict.items():
        for k2, v2 in dict.items():
                if k1 != k2:
                        time_list.append(v1+v2)
print(min(time_list))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
if __name__=='__main__':
    P,Q,R = map(int,input().split())
    if P <= R and Q <= R:
        print(P+Q)
    elif P <= Q:
        print(P+R)
    else:
        print(Q+R)

Submission status: Accepted

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

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

print(min(time_list))

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:
x,y,z = map(int, input().split())
xy = x + y
yz = y + z
zx = x + z
print(min([xy,yz,zx]))

Submission status: Accepted

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

print(sum(times[:2]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
p, q, r = map(int, input().split())
print(p + q + r - max([ p, q, r ]))

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    P, Q, R = map(int, stdin.readline().rstrip().split())
    
    maxRoot = max([P,Q,R])
    
    print(P+Q+R-maxRoot)

input = lambda: stdin.readline()
main()

Submission status: Accepted

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

pqr_list = [p, q, r]

pqr_list.sort(reverse=True)

ans=0
ans+=pqr_list.pop()
ans+=pqr_list.pop()

print(ans)

Submission status: Accepted

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

x = [P + Q, Q + R, P + R]
print(min(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:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a+b <= a+c and a+b <= b+c:
    print(a+b)
elif a+c <= a+b and a+c <= b+c:
    print(a+c)
else:
    print(b+c)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
 
input_dis = input()
distance = input_dis.split(" ")
 
minum_dis = 100000000
 
cal_dis1 = int(distance[0]) + int(distance[1])
cal_dis2 = int(distance[2]) + int(distance[0])
cal_dis3 = int(distance[2]) + int(distance[1])
 
if cal_dis1 < minum_dis:
    minum_dis = cal_dis1
if cal_dis2 < minum_dis:
    minum_dis = cal_dis2
if cal_dis3 < minum_dis:
    minum_dis = cal_dis3
    
print(minum_dis)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 200
for index, i in enumerate(pqr):
    ans = min(ans, i + pqr[(index + 1) % 3])

print(ans)

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())
# P, Q, R = 1, 3, 4

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

Submission status: Accepted

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

res=[P+Q,P+R,Q+R]
res.sort()
print(res[0])

Submission status: Accepted

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

PQR.sort()

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

Submission status: Accepted

Solution code:
#ABC129-A
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
A=IL()
A.sort()
print(A[0]+A[1])

Submission status: Accepted

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

Submission status: Accepted

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

#a b c a
# 1 3 4 

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

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

ans = min(min(a, b), c)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(min(S))

Submission status: Accepted

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

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:
l = list(map(int, input().split()))
print(min([sum(l) - l[i] for i in range(len(l))]))

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
n=[p+q,q+r,r+p,2*r+p,2*p+q,2*q+r,2*p+r,2*r+q,2*q+p]
ns=sorted(n)
print(ns[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from itertools import combinations

distances = [int(x) for x in sys.stdin.readline().split(' ')]
print(min([sum(x) for x in combinations(distances, 2)]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

min=P+Q


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

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

print(min)

Submission status: Accepted

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

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

print(min(test))

Submission status: Accepted

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

N = max(P,Q,R)

print(P+Q+R-N)

Submission status: Accepted

Solution code:
import numpy as np

P,Q,R = (int(x) for x in input().split())

times = []

times.append(P+Q)
times.append(P+R)
times.append(Q+R)

print(min(times))

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:
t_list=[]
is_arg_ok = False
try:
  t_list = [int(n) for n in input().split(' ')]
except:
  print('age,price must be numbers')
  sys.exit(1)

min_1 = 10000
min_2 = 10000
for i in range(len(t_list)):
    t1 = t_list[i]
    if min_1 > t1:
        min_2 = min_1
        min_1 = t1
    elif min_2 > t1:
        min_2 = t1
min_t = min_1 + min_2
print(min_t)

Submission status: Accepted

Solution code:
def smaller(x, y):
	if x < y: return x
	return y

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

r1 = P + Q
r2 = Q + R
r3 = R + P

print(smaller(r1, smaller(r2, r3)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=tuple(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,b+c,c+a))

Submission status: Accepted

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

Submission status: Accepted

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

min1=P
min2=Q

min1=101
min2=101





Z1=P+Q
Z2=Q+R
Z3=P+R
Z4=Q+R
Z5=R+P
Z6=Q+R

min1=Z1
if(min1>Z2):
    min1=Z2
if(min1>Z3):
    min1=Z3
print(min1)

Submission status: Accepted

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

main()

Submission status: Accepted

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

a = x + y
b = y + z
c = z + x

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

Submission status: Accepted

Solution code:
a_i = list(map(int, input().split()))
count = 0
total = 0
for i in sorted(a_i):
    total = total + i
    count = count + 1
    if count == 2:
        break
print(total)

Submission status: Accepted

Solution code:
A, B, C = list(map(int,input().split()))
res = []
res.append(A+B)
res.append(B+C)
res.append(A+C)
print (min(res))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
# p, q, r
l = list(map(int, input().split()))
# 全てのルートの組み合わせ（順序は考慮しない）
routes = list(itertools.combinations(l, 2))
# 飛行時間最小のものを取得
print(min([route[0]+route[1] for route in routes]))

Submission status: Accepted

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

import numpy as np
import scipy as sp

def main():
    try:
        li = list(map(int, input().split()))
        min_time = 1e100
        if li[0] + li[1] < min_time:
            min_time = li[0] + li[1]
        if li[1] + li[2] < min_time:
            min_time = li[1] + li[2]
        if li[2] + li[0] < min_time:
            min_time = li[2] + li[0]
        print(min_time)
    except:
        pass

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
lst = input().split()
p = int(lst[0])
q = int(lst[1])
r = int(lst[2])
lista = []
lista.append(p + q)
lista.append(r + q)
lista.append(p + r)
print(min(lista))

Submission status: Accepted

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


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

minlist = [abc, acb, bac]
print(min(minlist))

Submission status: Accepted

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

min = p + q

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

print (int(min))

Submission status: Accepted

Solution code:
l = sorted([int(i) for i in input().split()],reverse=True)

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

Submission status: Accepted

Solution code:
inp = input()
split_input = inp.split()
a = int(split_input[0])
b = int(split_input[1])
c = int(split_input[2])
max_n = max(a, b, c)
print(a+b+c-max_n)

Submission status: Accepted

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


result = sum(list_ABC) - max(list_ABC)
print(str(result))

Submission status: Accepted

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

t1 = a[0] + a[1]
t2 = a[0] + a[2]
t3 = a[1] + a[2]

if t1 <= t2 and t1 <= t3:
    print(t1)
elif t2 <= t1 and t2 <= t3:
    print(t2)
else:
    print(t3)

Submission status: Accepted

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

Submission status: Accepted

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

print(min(ans))

Submission status: Accepted

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

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

abc = P+Q
acb = R+Q
bac = P+R
bca = Q+R
cab = R+P
cba = Q+P

answer=min(abc,acb,bac,bca,cab,cba)
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
pqr = list(map(int,input().split(" ")))
print(sum(min(list(itertools.combinations(pqr, 2)), key=lambda x:sum(x))))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

a = []


P, Q, R=map(int, input().split())
a.append(P)
a.append(Q)
a.append(R)
max = 0
for i in a:
    if max < i:
        max = i

print(sum(a)-max)

Submission status: Accepted

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

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

print(transitmin)

Submission status: Accepted

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

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

if a <= b and c <= b:
  sum = a + c
if b <= a and c <= a:
  sum = b + c
if a <= c and b <= c:
  sum = a + b






#出力
print(str(sum))

Submission status: Accepted

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

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

if a == max([a,b,c]):
  out=b+c
elif b== max([a,b,c]):
  out=a+c
elif c == max([a,b,c]):
  out=a+b
  
print(out)

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

Submission status: Accepted

Solution code:
import itertools
a= list(map(int, input().split()))
result = []
test = list(itertools.permutations(a, 2))
for i in range(len(test)):
    result.append(test[i][0] + test[i][1])
print(min(result))

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:
s=[int(i) for i in input().split()]
s.sort()
print(s[0]+s[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

times.sort()
print(times[0] + times[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 = (int(i) for i in input().split())
p = sorted(p)
print(p[0] + p[1])

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
d=a+b+c-max([a,b,c])
print('{0}'.format(d))

Submission status: Accepted

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

l = [p, q, r]

l.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(min_h)

Submission status: Accepted

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

Submission status: Accepted

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

P.sort()

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

Submission status: Accepted

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

min_t = 1000

for i in range(3):
    if i == 2:
        min_t = min(min_t, t[i] + t[0])
    else:
        min_t = min(min_t, t[i] + t[i+1])

print(min_t)

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

b = 0
for x in a:
    if b<x:
        b=x
print(a[0]+a[1]+a[2]-b)

Submission status: Accepted

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

p, q, r = inpl()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t1, t2, t3 = sorted(map(int, input().split()))

print(t1 + t2)

Submission status: Accepted

Solution code:
from itertools import permutations

time = list(map(int,input().split(' ')))
min = sum(time)
perm = permutations(time,2)
for p in perm:
    s = sum(p)
    if s < min:
        min = s
print(min)

Submission status: Accepted

Solution code:
#coding: utf-8

line = input()
arr = []
for i in range(3):
	arr.append(int(line.split()[i]))
ans = sum(arr) - max(arr)
print(ans)

Submission status: Accepted

Solution code:
far=[]
min=0
pqr =list(map(int, input().split(" ")))

far=sorted(pqr)

for i in range(2):
    min+= far[i]
print(min)

Submission status: Accepted

Solution code:
int_list = []

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

a0 = P + Q
int_list.append(a0)
a1 = Q + R
int_list.append(a1)
a2 = P + R
int_list.append(a2)
a3 = Q + R
int_list.append(a3)
a4 = R + P
int_list.append(a4)
a5 = P + Q
int_list.append(a4)

print(min(int_list))

Submission status: Accepted

Solution code:
# coding: utf-8

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

lst.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    token = lines[0].split()
    a = int(token[0])
    b = int(token[1])
    c = int(token[2])

    return (a, b, c)


def solve(a, b, c):

        

    

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




def main():
    # 出力

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Submission status: Accepted

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

Submission status: Accepted

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

a = input().split()
p = int(a[0])
q = int(a[1])
r = int(a[2])
m = max(p,q,r)

print(p+q+r-m)

Submission status: Accepted

Solution code:
# from itertools import combinations
p, q, r = map(int, input().split())

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

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

Submission status: Accepted

Solution code:
num1, num2, num3 = [int(i) for i in input().split()]
a=[num1+num2,num2+num3,num1+num3]
print(min(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def solve():
    P, Q, R = list(map(int, input().split()))
    ans = min(P+Q, Q+R, R+P)

    print(ans)

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

print(sum(sorted(A)[:-1]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# abc129/abc129_a
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    P, Q, R = i2nn()
    print(P + Q + R - max(P, Q, R))
    return

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=input().split()
d=[a,b,c]
p = sorted(d)
#print(p)
k=int(p[0])+int(p[1])
print(k)

Submission status: Accepted

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