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:
# -*- coding: utf-8 -*-
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 = map(int, input().split())


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import combinations
inputs = map(int, input().split())

print(min(j + k for j, k in combinations(inputs, 2)))

Submission status: Accepted

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

s1 = P + Q
s2 = P + R
s3 = Q + R
print(min(s1, s2, s3))

Submission status: Accepted

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

a1 = p + q
a2 = q + r
a3 = r + p

print(min([a1,a2,a3]))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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 = [0,0,0]
a[0], a[1], a[2] = map(int, input().split())

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

Submission status: Accepted

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

result = P + Q
if Q + R < result:
    result = Q + R

if P + R < result:
    result = P + R

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R= map(int,input().split())
X=0
if P< Q:
    if Q<R:
        X=P+Q
    else:
        X=P+R
else:
    if P<R:
        X=P+Q
    else:
        X=Q+R

print(X)

Submission status: Accepted

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

seq = [P, Q, R]

total_list = []
for item in list(itertools.permutations(seq, 2)):
    total = item[0] + item[1]
    total_list.append(total)
print(min(total_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
q1,q2,q3 = sorted(list(map(int, input().split())))
print(q1+q2)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a, b, c = (int(i) for i in input().split())
print(min(a+b,b+c,c+a))

Submission status: Accepted

Solution code:

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
PQR = [int(_) for _ in input().split()]
PQR.sort()
print(sum(PQR[0:2]))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
P,Q,R=(int(x) for x in input().split())
maximum=max(P,Q,R)
sum=0
if(maximum==P):
    print(Q+R)
elif(maximum==Q):
    print(P+R)
elif(maximum==R):
    print(P+Q)

Submission status: Accepted

Solution code:
P, Q, R = map(int, input().split())
A = P + Q
B = Q + R
C = P + R
lst = [A,B,C]

print(min(lst))

Submission status: Accepted

Solution code:
import sys
import numpy as np
sys.setrecursionlimit(1000000)
 
pqr = list(map(int,input().split()))

pqr.sort()

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

Submission status: Accepted

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

print(sum(vals)-max(vals))

Submission status: Accepted

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

l.sort()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
num = []
num = [int(i) for i in input().split()]

big = max(num)
num.remove(big)

print(sum(num))

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 math

def main():
    p,q,r = map(int, raw_input().split())
    m = max(p,q,r)
    total = 0
    if p <= q and r <= q:
        total = p + r
    if q <= r and p <= r:
        total = p + q
    if r <= p and q <= p:
        total = q + r
    print total

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    P, Q, R = map(int, input().split())
    lists = []
    lists.append(P + Q)
    lists.append(Q + R)
    lists.append(P + R)
    print(min(lists))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

PQR.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

X.sort()

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jun  9 21:02:21 2019

@author: hisaki
"""

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

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

print (s)

Submission status: Accepted

Solution code:
def main():
    n=list(map(int,input().split(' ')))
    n_sorted = sorted(n)
    print(n_sorted[0]+n_sorted[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

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:

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


tmp.sort()

ans = sum(tmp[:2])
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
le = list(map(int, input().split())) 


le.sort()

print(sum(le[:-1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
data = [int(x) for x in stdin.readline().rstrip().split()]
ans = sorted(data)[0] + sorted(data)[1]
print(ans)

Submission status: Accepted

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from copy import copy
import numpy as np
from numpy.fft import fft, ifft
from fractions import gcd


def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


def LIST(): return list(map(int, input().split()))


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

p, q, r = MAP()

m = INF

lis=[p,q,r]

for x in range(2):
    for y in range(x+1,3):
        m = min(m, lis[x] + lis[y])
        
print(m)

Submission status: Accepted

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

a = p + q
b = q + r
c = r + p
print(min(a, b, c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == '__main__':

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

    ans = solv(p, q, r)

    print(ans)

Submission status: Accepted

Solution code:
p,q,r=map(int,input().split())
ans=[p+q,q+r,r+p]
A=min(ans)
print(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:
from sys import stdin

P,Q,R = [int(x) for x in stdin.readline().rstrip().split()]

tmpv = min(P+Q, Q+R)
minv = min(tmpv, R+P)

print(minv)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(min(a,b,c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)

# n = int(input())
# a, b = map(int, input().split())
# int_list = list(map(int, input().split()))
# l = list(input().split())

def solve():
    p, q, r = map(int, input().split())
    import math
    print(p+q+r - max([p, q, r]))
solve()

Submission status: Accepted

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

Submission status: Accepted

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

# 昇順にソートし、最小の２つの和
print(sum(sorted(PQR)[:2]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from itertools import permutations

P, Q, R = map(int, input().split())
ans = 1000000
for t in permutations([P, Q, R], 2):
    ans = min(ans, sum(t))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

a = P+Q
b = Q+R
c = R+P
ans = min(a,b,c)

print(ans)

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

m = max(p,q,r)

print(p+q+r-m)

Submission status: Accepted

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

ans = float('inf')
ans = min(ans, P + Q)
ans = min(ans, R + Q)
ans = min(ans, P + R)
ans = min(ans, Q + R)
ans = min(ans, Q + P)
ans = min(ans, Q + P)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

R1 = P+Q
R2 = P+R
R3 = Q+R

print(min(R1,R2,R3))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

def main():
    input = sys.stdin.readline
    A = list(map(int, input().split()))
    A.sort()
    return sum(A[:2])


if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

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

print(min(answer))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [P, Q, R] = list(map(lambda x: int(x), inputs[0].split()))
    l = []
    l.append(P + Q)
    l.append(P + R)
    l.append(Q + R)

    min = P + Q
    for i in l:
        min = i if min > i else min
    return min


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

Solution code:

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

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

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:
def resolve():
    Hs = list(map(int, input().split(" ")))
    sums = sum(Hs)
    maxh = max(Hs)
    print(sums - maxh)
        

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

a=n+k
b=k+l
c=l+n
print(min(a,b,c))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(min(a,b,c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

d = list(map(int, input().split()))
md = sum(d) - max(d)
print(md)

Submission status: Accepted

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

Submission status: Accepted

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

from collections import deque
import itertools as ite
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

A, B, C = map(int, raw_input().split())
print min(A + B, B + C, C + A)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

min=10000

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

print(min)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
ls = list(map(int,input().split()))
ls.sort()
print (sum(ls[0:2]))

Submission status: Accepted

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

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

print(e)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# IMPORT ###############################################################################################################
import sys                                                      # システム
sys.setrecursionlimit(10**6)                                    # 再帰処理の上限変更
from collections import deque, Counter                          # キュー・個数カウント
from itertools   import accumulate, permutations, combinations  # 累積和・順列・組み合わせ
from operator    import itemgetter                              # ソート補助
from bisect      import bisect_left, bisect_right, bisect       # 二分探索
from heapq       import heappop, heappush                       # プライオリティキュー
from fractions   import gcd                                     # 最大公約数
from math        import ceil, floor, sqrt, cos, sin, tan, pi    # 数学処理
from copy        import deepcopy                                # オブジェクトコピー
import numpy         as np                                      # 数値計算

# MAIN #################################################################################################################
def main():
    # Init #############################################################################################################
    im = InputManager()
    # Input ############################################################################################################
    pqr = im.inputMultiple(aslist=True)
    # Logic ############################################################################################################
    print("{}".format(sum(pqr) - max(pqr)))
    # Output ###########################################################################################################

    # Return ###########################################################################################################
    return

# INPUT MANAGER ########################################################################################################
class InputManager(object):
    def __init__(self):
        pass

    @staticmethod
    def inputSingle(dtype=int):
        return dtype(input())
    
    @staticmethod
    def inputMultiple(dtype=int, aslist=False):
        if aslist:
            return list(map(dtype, input().split()))
        else:
            return map(dtype, input().split())

    @staticmethod
    def input2D(h, dtype=int):
        return [list(map(dtype, input().split())) for i in range(h)]

# CALL MAIN ############################################################################################################
main()

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


ps.sort()
ans = 0

for i in range(2):
    ans+= ps[i]

print (ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    li = LI()
    li.sort()
    ans = sum(li[:2])
    return ans

print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#a.py
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())
a = p+q
b = q+r
c = r+p
print(min(a,b,c))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/local/bin/python3
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a = f()
    print(sum(a) - max(a))

solve()

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

l=LIST()

l.sort()
print(sum(l[:2]))

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:
#!/usr/bin/env pypy
from __future__ import division, print_function

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


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


# region fastio

BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

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:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

maxs = max(a,b,c)

print(a + b + c - maxs)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

input = sys.stdin.readline
a, b, c = map(int, input().split())

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

Submission status: Accepted

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

nums = sorted(nums)

print(sum(nums[:2]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
l = [A,B,C]
l.sort()
print(l[0]+l[1])

Submission status: Accepted

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

l=[p,q,r]
print(sum(l)-max(l))

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
p,q,r=map(int,input().split())
n=[p,q,r]
n.sort()
print(n[1]+n[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq as hq
import itertools as its
import operator as op


# globals
inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    # ----------MAIN----------
    p, q, r = get_li()
    print(min(p + q, q + r, r + p))
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

p = int(p)
q = int(q)
r = int(r)

pqr = [p, q, r]
pqr.sort()
ans = pqr[0] + pqr[1]

print(ans)

Submission status: Accepted

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

pqr.sort()

print(sum(pqr[:2]))

Submission status: Accepted

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

ans = P+Q if P+Q < R+Q else R+Q
ans = P+R if P+R < ans else ans
print(ans)