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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
air = list(map(int, input().split()))
air.pop(air.index(max(air)))
print(sum(air))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
A=a+b
B=b+c
C=c+a
list=[A,B,C]
D=sorted(list)
print(D[0])

Submission status: Accepted

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

ar.sort()

print(str(ar[0] + ar[1]))

Submission status: Accepted

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

print(sum(t)-max(t))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = list(input().split())
a = max(K)
S = int(K[0])+int(K[1])+int(K[2])-int(a)
print(S)

Submission status: Accepted

Solution code:
# coding: utf-8
# Author:Code
p, q, r = map(int, raw_input().split())
mx = p
if mx < q:
    mx = q
if mx < r:
    mx = r

print p + q + r - mx

Submission status: Accepted

Solution code:
# coding: utf-8 
#Author:Code
p, q, r = map(int, raw_input().split())
mx = p
if mx < q:
    mx = q
if mx < r:
    mx = r

print p + q + r - mx

Submission status: Accepted

Solution code:
p,q,r=map(int,raw_input().split())
mx=p
if mx<q:
  mx=q
if mx<r:
  mx=r
print p + q + r - mx

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:
list = [int(i) for i in input().split()]
x, y, z = sorted(list)
print(x + y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import datetime

# 入力
#N = int(input())
#S = str(input())
#H, W = map(int, input().split())
P, Q, R = map(int, input().split())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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())
X = P + Q
Y = P + R
Z = Q + R

ans = min(X, Y, Z)

print(ans)

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:
P,Q,R=tuple(map(int,input().split()))
if P+Q<=Q+R and P+Q<=P+R:
    print(P+Q)
elif Q+R<=P+Q and Q+R<=R+P:
    print(Q+R)
else:
    print(P+R)

Submission status: Accepted

Solution code:
#Airplane
A, B, C = map(int,input().split())
L = [A,B,C]
L.remove(max(L))
print(sum(L))

Submission status: Accepted

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

Submission status: Accepted

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

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 = sorted([int(i) for i in input().split(" ")])
print(a[0] + a[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:
PQR = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import itertools
#p,q,r = map(int,input().split())
times = map(int,input().split())
ans = 900
for time in itertools.combinations(times,2):
  ans = min(ans,time[0] + time[1])
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(ar):
    """Test Case
    >>> print_ans([1, 3, 4])
    4
    >>> print_ans([3, 2, 3])
    5
    """
    print(sum(ar) - max(ar))

if __name__ == '__main__':
    ar = list(map(int, input().rstrip().split()))
    print_ans(ar)

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
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())
ans = 0

inplutlist=inpl()
anslist = heapq.nsmallest(2,inplutlist)
ans = sum(anslist)
print(ans)

Submission status: Accepted

Solution code:
s = input()
l = s.split(' ')
m = list(map(int, l))
p, q, r = m
list_of_times = [p + q, p + r, q + r]
f = min(list_of_times)
print(f)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())
list = [p+q, q+r, r+p]
print(min(list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

x = P + Q
y = Q + R
z = R + P

if x < y:
    if x < z:
        print(x)
    else:
        print(z)
else:
    if y < z:
        print(y)
    else:
        print(z)

Submission status: Accepted

Solution code:
# 2019-11-14 10:01:24(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    times = [int(x) for x in sys.stdin.readline().split()]
    times.sort()
    ans = sum(times[:2])
    print(ans)




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(1, 3, 4), 4)

    def test_2(self):
        self.assertEqual(think(3, 2, 3), 5)


def solve():
    p, q, r = read()
    result = think(p, q, r)
    write(result)


def read():
    return read_int(3)


def read_int(n):
    return read_type(int, n)


def read_float(n):
    return read_type(float, n)


def read_type(t, n):
    return list(map(lambda x: t(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(p, q, r):
    return min(p + q, q + r, r + p)


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(l[:2]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# A - Airplane
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 = map(int, input().split())

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

Submission status: Accepted

Solution code:
N = input()
numberArray = [int(x) for x in N.split()]
min1 = min(numberArray)
numberArray.remove(min(numberArray))
min2 = min(numberArray)
numberArray.remove(min(numberArray))
print(min1 + min2)

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

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

print(min(distance))

Submission status: Accepted

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

Submission status: Accepted

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

d.sort()
wa = d[0] + d[1]

print(wa)

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:
import sys
sys.setrecursionlimit(10**9)
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = [0]*3

l[0],l[1],l[2] = map(int,input().split())

l.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
#%%
import sys
def input():
    return sys.stdin.readline().rstrip()

def main():
    P, Q, R = map(int, input().split())
    print(P+Q+R-max(P,Q,R))

# %%
if __name__ == '__main__':
    main()

# %%
# from atcoder_test import doTest
# doTest("abc129","a",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() )
A = P + Q
B = P + R
C = Q + R

print( min(A,B,C) )

Submission status: Accepted

Solution code:
a, b, _ = sorted(list(map(int,input().split())))
print(a+b)

Submission status: Accepted

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

li=[p,q,r]

li.sort()

print(sum(li)-li[2])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#https://atcoder.jp/contests/abc129/tasks/abc129_a
import sys

#n= int(input())
#s= input()
tmp = input().split()
p,q,r = list(map(lambda a: int(a), tmp))

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

Submission status: Accepted

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

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

if (x <= y) and (x <= z):
    print(x)
elif (y <= x) and (y <= z):
    print(y)
else:
    print(z)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
p,q,r = input().split()
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 = [int(x) for x in input().split()]

l = [P, Q, R]
res_l = []
for (i_index, i) in enumerate(l):
    for (j_index, j) in enumerate(l):
        if i_index != j_index:
            res_l.append(i+j)

print(min(res_l))

Submission status: Accepted

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

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

print(min(res_l))

Submission status: Accepted

Solution code:
# ABC129 A - Airplane
# 2019/11/07

P,Q,R = map(int, open(0).read().split())
# print(P,Q,R)
print(min(P+Q, Q+R, P+R))

Submission status: Accepted

Solution code:
tmp = list(map(int, input().split()))
p = tmp[0]
q = tmp[1]
r = tmp[2]

maxv = max(p, q, r)

print(p+q+r-maxv)

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())
L =[]
l1 = P+Q
l2 = P+R
l3 = Q+R
l4 = Q+P
l5 = R+P
l6 = R+Q
L.extend([l1, l2, l3, l4, l5, l6])
print(min(L))

Submission status: Accepted

Solution code:
# ABC 129: A – Airplane
flight_times = [int(s) for s in input().split()]

min_flight_time = 999999999

for i in range(3):
    for j in range(3):
        if i != j:
            min_flight_time = min(min_flight_time, flight_times[i] + flight_times[j])

print(min_flight_time)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    lst=list(sorted(map(int,input().split())))
    print(sum(lst[:2]))

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(min(time))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
pqr = [int(i) for i in input().split()]
print(sum(sorted(pqr)[:-1]))

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(P: int, Q: int, R: int):
    print(sum([P,Q,R])-max([P,Q,R]))
    return



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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = p + q + r

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

print(ans)

Submission status: Accepted

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

ans = a + b 
if a + c < ans: ans = a + c
if b + a < ans: ans = b + a
if b + c < ans: ans = b + c
if c + a < ans: ans = c + a
if c + b < ans: ans = c + b


print(ans)

Submission status: Accepted

Solution code:
a,b,c=map(int, input().split())
d=a+b
e=a+c
f=b+c
r=[]
r.append(d)
r.append(e)
r.append(f)
mi=r[0]
for i in r:
  if i<=mi:
    mi=i
    
print(mi)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools

s = list(map(int, input().split()))
s = itertools.combinations(s, 2)

mins = 1000000000
for ss in s:
  mins = min(mins, sum(ss))

print(mins)

Submission status: Accepted

Solution code:
A = sorted([int(i) for i in input().split()])
print(A[0] + A[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:
from collections import Counter,defaultdict,deque
import sys,bisect,math,itertools,string,queue
from heapq import heappop, heappush
sys.setrecursionlimit(10**8)
mod = 10**9+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())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

p = inpl()
p.sort()
print(p[0]+p[1])

Submission status: Accepted

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

def main():
    range_list = [int(s) for s in input().split()]
    range_list.sort()
    print(range_list[0] + range_list[1])

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

pq=P+Q
qr=Q+R
rp=R+P

print(min(pq,qr,rp))

Submission status: Accepted

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

Submission status: Accepted

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

    array = sorted(array)
    ans = array[0] + array[1]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(min([x,y,z]))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = list(map(int, input().split()))
min1 = min(x)
x.remove(min1)
min2 = min(x)

print(min1 + min2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(P: int, Q: int, R: int):
    a = P + Q
    b = Q + R
    c = R + P
    print(min([a, b, c]))
    return


# Generated by 1.1.5 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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10 ** 7)


def solve(P: int, Q: int, R: int):
    lst = [P, Q, R]
    lst.sort()
    print(lst[0] + lst[1])
    return


# Generated by 1.1.5 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:
A, B, C = map(int, input().split())
print(min(A+B, B+C, C+A))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

a=A+B
b=C+B
c=A+C
print(min(a,b,c))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ABC = input().split()
AtoB = int(ABC[0])
BtoC = int(ABC[1])
CtoA = int(ABC[2])
l = []
for i in range(3):
    l.append(int(ABC[i]))
l.sort()
answer = l[0] + l[1]
print(answer)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

P,Q,R = sorted(map(int,read().split()))

answer = P+Q
print(answer)

Submission status: Accepted

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

hoge.sort()

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

Submission status: Accepted

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

print(min(l))

Submission status: Accepted

Solution code:
p=input().split()
q= [int(s) for s in p]
q.sort()
print(q[0]+q[1])

Submission status: Accepted

Solution code:
#1行目に複数の整数の場合
p, q, r = map(int, input().split())

#a→b→c、a→c→b、b→a→c、b→c→a、c→a→b、c→b→a
#これらの経路の内最短を求めればより
#a→b、b→aはともにp時間のため
#a→b→c、c→b→aの経路にかかる時間は同値
#p,  q, rの全てのcombination（組み合わせ）の内最小値を求める
#min(value, value, value)で最小値を求める
print(min(p + q, q + r, r + p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

N.sort()

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

Submission status: Accepted

Solution code:
INPUT = list(map(int,input().split()))
P = INPUT[0]
Q = INPUT[1]
R = INPUT[2]

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

Submission status: Accepted

Solution code:
'''A - Airplane
https://atcoder.jp/contests/abc129/tasks/abc129_a

>>> main(1, 3, 4)
4
>>> main(3, 2, 3)
5

in5.txt
>>> main(99, 62, 92)
154'''

from itertools import permutations


def main(p, q, r):
    _max = 999

    for p in permutations([p, q, r], 2):
        if _max > sum(p):
            _max = sum(p)

    print(_max)


if __name__ == '__main__':
    p, q, r = map(int, input().split(' '))
    main(p, q, r)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    p, q, r = list(map(int, input().rstrip('\n').split()))
    print(min(p + q, q + r, r + p))


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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