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

elif b+c<=a+b and b+c<=a+c:
  print(b+c)

else:
  print(a+c)

Submission status: Accepted

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

Submission status: Accepted

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

ans = sum(inp) - max(inp)

print(ans)

Submission status: Accepted

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

d.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

P, Q, R = lr()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    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:A~B,Q:B~C,R:C~A
print(min(P+Q,P+R,Q+R))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

p = int(i[0])
q = int(i[1])
r = int(i[2])

v1 = p + q
v2 = q + r
v3 = p + r

if v1 < v2 and v1 < v3:
    print(v1)
elif v2 < v3:
    print(v2)
else:
    print(v3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
linha = input()
linha = linha.split()
menor = 101
segundoMenor = 101
for x in linha:
    if int(x) < menor:
        menor = int(x)
for x in linha:
    if int(x) <= segundoMenor and int(x) != menor:
        segundoMenor = int(x)
if linha[0] == linha[1] and linha[0] == linha[2]:
    print(int(linha[0]) + int(linha[1]))
else:
    print(menor + segundoMenor)

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
flights = {
"a_b_c": p + r,
"a_c_c": q + r,
"c_b_a": q + p
}
print(min(flights.values()))

Submission status: Accepted

Solution code:
line = input()
a, b, c = [int(n) for n in line.split()]
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:
a,b,c = input().split()
a = int(a)
b= int(b)
c = int(c)

if 1 <= a <= 100:
    if 1 <= b<= 100:
        if 1 <= c <= 100:
            p = a + b
            q = b + c
            r = c + a

            lista = [p,q,r]
            print(min(lista))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

else:
	print(R+Q)

Submission status: Accepted

Solution code:
numerosSTR = input().split(" ")
for i in numerosSTR:
    a = int(numerosSTR[0])
    b = int(numerosSTR[1])
    c = int(numerosSTR[2])
minimos=[a,b,c]
k = min(minimos)
minimos.pop(minimos.index(k))
print(k+min(minimos))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input()

costs = []
for n in line.split():
    costs.append(int(n))

costs.sort()

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

Submission status: Accepted

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

xs = sorted(xs)
# print(xs)

flights = xs[0] + xs[1]
print(flights)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())

l = [p, q, r]
l = sorted(l)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")


p,q,r = MI()

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

Submission status: Accepted

Solution code:
time = list(map(int, input().split()))
time = sorted(time)
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:
distance = list(map(int, input().split()))

print(sum(distance) - max(distance))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def q1():
    from itertools import combinations
    distance = [int(i) for i in input().split()]
    Perm = combinations(distance, 2)
    ans = 10000
    for p in Perm:
        ans = min(ans, sum(p))
    print(ans)


if __name__ == '__main__':
    q1()

Submission status: Accepted

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

ans = 10**1000
tmp = 0

for i in range(2):
    for j in range(i+1, 3):
        tmp = A[i] + A[j]
        ans = min(ans, tmp)

print(ans)

Submission status: Accepted

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

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:
from operator import itemgetter
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    p, q, r = MII()
    print(min(min(p+q, p+r), q+r))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputted = list(map(int, input().split()))
AB = BA = inputted[0]
BC = CB = inputted[1]
AC = CA = inputted[2]

answer = min([
    AB + BC,
    AC + CB,
    BA + AC,
    BC + CA,
    CA + AB,
    CB + BA,
])

print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")

PQR = LI()
PQR.sort(reverse=True)
print(sum(PQR[1:]))

Submission status: Accepted

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

l.sort()

l.pop()

print(sum(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# python 3.4.3
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
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())
a=A+B
b=A+C
c=B+C
print(min(a,b,c))

Submission status: Accepted

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

l = sorted(l)

d = l[0] + l[1]

print(d)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A = lr()
answer = sum(A) - max(A)
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

Submission status: Accepted

Solution code:
n=input().rstrip().split()
n=[int(x) for x in n]
nn=[]
for i in range(len(n)):
  for j in range(len(n)):
    if i!=j:
      nn.append(n[i]+n[j])
print(min(nn))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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())
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())

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

print(min(li))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 129: A – Airplane
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())

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

print(sum)

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

Submission status: Accepted

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

ans.sort()

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

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  p, q, r = map(int, readline().split())
  print(p+q+r-max(p,q,r))
  
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
f = list(map(int,input().split()))
f.sort()
print(f[0]+f[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:
P,Q,R=map(int,input().split())
a=P+Q
b=Q+R
c=P+R
print(min(a,b,c))

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  L = list(map(int,input().split()))
  L = sorted(L)
  print(L[0]+L[1])
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

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

print(mini)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

*t, = map(int, sys.stdin.readline().split())

def main():
    ans = sum(t) - max(t)
    print(ans)

if __name__ ==  '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
p,q,r = iim()
print(p+q+r - max(p,q,r))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sorted(ans)
print(P+Q+R-max(ans))

Submission status: Accepted

Solution code:
from itertools import combinations

l = list(map(int,input().split()))
tmp = list(combinations(l,2))

res = 10**10
for i in tmp:
    m = sum(i)
    if res > m:
        res = m

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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


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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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, p + r, q + r))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

lst2 = sorted(lst)
# print(lst2)

D = lst2[0] + lst2[1]
print(D)

Submission status: Accepted

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
arr = list(map(int,input().split()))

ans = 11000
for i in range(len(arr)):
    for j in range(i+1,len(arr)):
        num = arr[i]+arr[j]
        ans = min(ans,num)

print(ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

Submission status: Accepted

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

print(min(time)+sorted(time)[-2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s,t,u=sorted(map(int,input().split()));print(s+t)

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())
print(A+B+C-max(A,B,C))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N, M, L = map(int, input().split())
    return min(N+M, M+L, L+N)

print(solve())

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

A, B, C = map(int, input().split())
print(A + B + C - max(A, B, C))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(i) for i in input().split()]
print(min(a) + min([a[i] for i in range(len(a)) if i != a.index(min(a))]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p,q,r = map(int, input().split())
abc = p + q
acb = r + q
bac = p + r

shortest = min(abc,acb,bac)
print(shortest)

Submission status: Accepted

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

lis = sorted(lis)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

a_n = sorted(a_n)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC129 A

def main():
    p, q, r = map(int, input().split())
    
    resList = [p+q, p+r, q+r]

    print(min(resList))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=[int(x) for x in input().rstrip().split()]
ans=100000000
for i in range(3):
    for j in range(3):
        if i!=j:
            ans=min(ans,l[i]+l[j])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ab , bc , ca = map(int , input(). split())
print(ab + bc + ca - max(ab , bc , ca))

Submission status: Accepted

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

A.sort()

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

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
total = 0
for _ in range(2):
    total += min(l)
    l.remove(min(l))
print (total)

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 = P + Q + R - max(P, Q, R)

print(ans)

Submission status: Accepted

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

print(sum(pqr[:2]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import combinations as comb
import numpy as np


def main():
    p, q, r = map(int, input().split())
    abc_comb = np.array(list(comb([p, q, r], 2)))
    print(np.min(np.sum(abc_comb, axis=1)))


if __name__ == "__main__":
    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()))
ans = []
for i in range(3):
    for j in range(3):
        if i == j:
            continue
        ans.append(P[i]+P[j])
ans.sort()
print(ans[0])

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

L.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(sum(pqr) - max(pqr))

Submission status: Accepted

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

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

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

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

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

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()))
l = sorted(l)
print(l[0] + l[1])

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

Submission status: Accepted

Solution code:
# A - Airplane
import itertools
P,Q,R=list(map(int,input().split()))

m=99999
#for v in itertools.permutations([P,Q,R],2):
for v in itertools.combinations([P,Q,R],2):
    m=min(m,v[0]+v[1])
    #print(v)

print(m)

Submission status: Accepted

Solution code:
# A - Airplane
import itertools
P,Q,R=list(map(int,input().split()))

m=99999
for v in itertools.permutations([P,Q,R],2):
    m=min(m,v[0]+v[1])

print(m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(3):
    for j in range(3):
        if i == j:
            pass
        else:
            path_len = pql[i]*2 + pql[j]
            if path_len < mpath:
                mpath = path_len
            path_len = pql[i] + pql[j]
            if path_len < mpath:
                mpath = path_len
                
print(mpath)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import bisect
from collections import Counter, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    p, q, r = list(map(int,ipti().split()))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 100100100
for x, y in itertools.combinations([p, q, r], 2):
    ans = min(ans, x+y)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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