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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

abc = [int(i) for i in stdin.readline().rstrip().split(" ")]
s = sum(abc) 
m = max(abc)
print(s-m)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
pqr = [int(i) for i in input().split()]
m = max(pqr)
pqr.remove(m)

print(sum(pqr))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(P)-max(P))

Submission status: Accepted

Solution code:
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())
###template###

P,Q,R = mi()
max = max(P,Q,R)

print(P+Q+R-max)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(sum(s)-max(s))

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 math

a, b, c= [int(i) for i in input().split()]
#table = [[int(i) for i in input().split()] for n in range(n)]
#light = [int(i) for i in input().split()]
#s = input()
#list = list(s)

#print(n, m)
#print(table)
#print(light)

kotae = 0

kotae = a + b + c - max(a, b, c)

print(kotae)

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

def main(P, Q, R):
    print(min([P+Q, Q+R, P+R]))

if __name__ == "__main__":
    P, Q, R = [int(x) for x in input().split()]

    main(P, Q, R)

Submission status: Accepted

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

Submission status: Accepted

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

# In[6]:


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


# In[7]:


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


# In[ ]:

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:
l = []
a = [int(i) for i in input().split()]
l = sorted(a)
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:

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def lmi(): return list(map(int, input().split()))

p = lmi()

print(sum(sorted(p)[:2]))

Submission status: Accepted

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

print(min([a+b for a, b in combinations([p,q,r],2)]))

Submission status: Accepted

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


main()

Submission status: Accepted

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

print(sum(airports) - max(airports))

Submission status: Accepted

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

r1 = sum(n1) - max(n1)
print(r1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[int(i) for i in 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,a+c,c+b))

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

P = read_int()
P.sort()
def solve():
    return P[0] + P[1]

if __name__ == "__main__":
    print(solve())

Submission status: Accepted

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

print(sum(l[:2]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
# from itertools import permutations
input = sys.stdin.readline

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

list = [p, q, r]

max_ = max(list)

sum_ = sum(list) - max_

print(sum_)

Submission status: Accepted

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

Submission status: Accepted

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

v1 = a + b
v2 = b + c
v3 = c+a

v = [v1,v2,v3]
print(min(v))

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:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]
    

"""
N, X = map(int, input().split())

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

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

# 多次元配列の宣言（あとでintにすること。）（タプルにすること。）
dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

#Distance Transformation
    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""



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

    
if __name__ == '__main__':
    main()

Submission status: Accepted

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


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



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

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:
P, Q, R = map(int, input().split())
ary = [P, Q, R]
ary = sorted(ary)
print(ary[0] + ary[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:
costs = [int(i) for i in input().split()]
costs.sort()

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(sum(M)-max(M))

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


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

Submission status: Accepted

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

n.sort()

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

Submission status: Accepted

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

out = sum(inputs[0:2])
print(out)

Submission status: Accepted

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

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

Submission status: Accepted

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

max = 0
sum = 0

for i in a:
    if max < i:
        max = i
    sum += i

print(sum-max)

Submission status: Accepted

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

print(sum(i) -max(i))

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:
li = list(map(int, input().split()))
li.sort()
time = 0
for i in range(2):
    time += li[i]

print(time)

Submission status: Accepted

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

pq = p + q
qr = q + r
rp = r + p

ans = [pq, qr, rp]
print(min(ans))

Submission status: Accepted

Solution code:
# coding: utf-8
import os
import time
import re
import math

def main():
    #s=input()
    #n=int(input())
    P,Q,R=map(int,input().split())

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



start=time.time();
main()
#print(time.time()*1000-start*1000)

Submission status: Accepted

Solution code:
x,y,z =list(map(int,input().split()))

ans = []
ans.append(x + y)
ans.append(x+z)
ans.append(y+z)

print(min(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = [int(x) for x in input().split(' ')]
print(min([A + B, B + C, C + A]))

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b = map(int, input().split())
# s = input()

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

print(sum(p) - max(p))

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:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.special import perm
# from scipy.special import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

########

P, Q, R = l_inpl()

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

Submission status: Accepted

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

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

x.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p, q, r = map(int, input().split())
ans = float('inf')
if p+q < ans : ans = p+q
if q+r < ans : ans = q+r
if r+p < ans : ans = r+p

print(ans)

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

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

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

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 heapq
import math
import sys

ary = [int(a) for a in input().split()]
s = sum(ary)

print(s - max(ary))

Submission status: Accepted

Solution code:
from sys import stdin
PQR = [int(_) for _ in stdin.readline().rstrip().split()]
PQR.sort()
print(PQR[0]+PQR[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a = sorted(map(int, input().split()))
print(a[0] + a[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

p,q,r = get_nums_l()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline

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

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

print(a)

Submission status: Accepted

Solution code:
import bisect
from operator import itemgetter
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a,b,c = IL()
ans = sum([a,b,c])-max(a,b,c)
print(ans)

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

Submission status: Accepted

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

print(sum(d)-max(d))

Submission status: Accepted

Solution code:
from sys import stdin

P, Q, R = [int(x) for x in stdin.readline().rstrip().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:
pqr=list(map(int,input().split()))
pqr.sort()
pqr.pop(2)
print(sum(pqr))

Submission status: Accepted

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

x = list(map(int, input().split()))
x.sort()

print(x[0] + x[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:
# -*- coding: utf-8 -*-
"""
AtCoder A
"""

# import sys, math, random
# import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
 
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    A, B, C = list(map(int,input().split()))
    o=max(A,B,C)
    print(A+B+C-o)
    
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:
p,q,r=sorted(map(int,input().split()))
print(p+q)

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

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

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:
#!/usr/bin/env python
p, q, r = map(int, input().split())
if p == max(p, q, r):
    print(q+r)
elif q == max(p, q, r):
    print(p+r)
else:
    print(p+q)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#
import sys
import math
import numpy as np
import itertools


# いくつか入力
a, b, c = (int(i) for i in input().split())  

p=min(a+b,b+c,c+a)

print(p)

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions
from collections import deque
import itertools

INF = 10 ** 10

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

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

print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(sum(sorted(arr)[0:2]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
def ddprint(x):
  if DBG:
    print(x)


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b,c = map(int, input().split())
print(a+b+c-max(a,b,c))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
l = list(map(int, input().split()))
l.sort()
print(l[0] + l[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C=input().split()
a=int(A)
b=int(B)
c=int(C)
m=min(a+b,b+c,c+a)
print(m)

Submission status: Accepted

Solution code:
pqr = [int(i) for i in input().split()]
pqr.sort()
ans = sum(pqr[:2])
print(ans)

Submission status: Accepted

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

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:
from heapq import heappush, heappop, heapify, heapreplace
from collections import defaultdict


class Solution:
    def main(self):
        costs =list(map(int, input().split()))
        costs = sorted(costs)
        print(sum(costs[:2]))

if __name__ == '__main__':
    Solution().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:
A,B,C=map(int,input().split())
print(A+B+C-max(A,B,C))

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

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

# N = int(input())
# L = [int(x) for x in input().split()]
P, Q, R = map(int, input().split())
# S = input()

ps = [P, Q, R]
ps.sort()

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

Submission status: Accepted

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

m = max(p,q,r)

print(p+q+r-m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x.sort()

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
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()))
print(sum(a)-max(a))

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

p,q,r = na()

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

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

print(p[0]+p[1]+p[2]-max(p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
AB, BC, CA = [int(x) for x in input().split()]

print(min(AB+BC, BC+CA,CA+AB))

Submission status: Accepted

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

print(sum(li) - max(li))

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 = [int(x) for x in input().split()]
print(sum(PQR) - max(PQR))

Submission status: Accepted

Solution code:
l = [int(s) for s in input().split()]
l.sort()
print(sum(l[:2]))

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 = [int(i) for i in 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)