Problem:


ランチ (Lunch) 

問題

JOI パスタ店では，ランチのおすすめパスタと搾りたてジュースのセットメニューが好評である．このセットメニューを注文するときは，その日の 3 種類のパスタと 2 種類のジュースから 1 つずつ選ぶ．パスタとジュースの値段の合計から 50 円を引いた金額が代金となる．

ある日のパスタとジュースの値段が与えられたとき，その日のセットメニューの代金の最小値を求めるプログラムを作成せよ．

 入力

入力は 5 行からなり，1 行に 1 つずつ正の整数が書かれている．

1 行目の整数は 1 つ目のパスタの値段である．

2 行目の整数は 2 つ目のパスタの値段である．

3 行目の整数は 3 つ目のパスタの値段である．

4 行目の整数は 1 つ目のジュースの値段である．

5 行目の整数は 2 つ目のジュースの値段である．

ただし，与えられる入力データにおいては全てのパスタとジュースの値段は 100 円以上 2000 円以下であることが保証されている．

出力

その日のセットメニューの代金の最小値を 1 行で出力せよ．

  入出力例

入力例 1

  

800
700
900
198
330 

出力例 1

   

848

入出力例 1 では，2 つ目のパスタと 1 つ目のジュースを組み合わせた場合の 
700 + 198 - 50 = 848 がその日のセットメニューの代金の最小値である．

入力例 2

  

1999
1999
100
189
100

出力例 2

   

150

入出力例 2 では，3 つ目のパスタと 2 つ目のジュースを組み合わせた場合の 
100 + 100 - 50 = 150 がその日のセットメニューの代金の最小値である．

問題文と自動審判に使われるデータは、情報オリンピック日本委員会が作成し公開している問題文と採点用テストデータです。



Sample input:
800
700
900
198
330


Sample output:
848

Submission status: Wrong Answer

Solution code:
1999
1999
100
189
100

Submission status: Wrong Answer

Solution code:
p = min(input(), input, input())
j = min(input(), input())

print (p + j) - 50

Submission status: Accepted

Solution code:
l=[]
for i in range(3):
	tmp=int(input())
	l.append(tmp)
j=[]
for i in range(2):
	tmp=int(input())
	j.append(tmp)
a=min(l)+min(j)-50	
print(a)

Submission status: Accepted

Solution code:
l = [input() for i in range(5)]
print min(l[:3]) + min(l[3:]) - 50

Submission status: Accepted

Solution code:
a = [int(input()) for _ in range(3)]
b = [int(input()) for _ in range(2)]
print(min(a) + min(b) - 50)

Submission status: Accepted

Solution code:
a=min(input()for _ in range(3))
b=min(input()for _ in range(2))
print a+b-50

Submission status: Accepted

Solution code:
a=[int(input()) for i in range(5)]
print(min(a[:3])+min(a[3:5])-50)

Submission status: Accepted

Solution code:
pz= [int(input()) for _ in range(5)]
print(min(pz[:3])+min(pz[3:])-50)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0565

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    pastas = [int(input()) for _ in range(3)]
    drinks = [int(input()) for _ in range(2)]
    total = min(pastas) + min(drinks) - 50
    print(total)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
def main():
    p = [] #pasta
    j = [] #juice

    for _ in range(3):
        p.append(int(input()))
    for _ in range(2):
        j.append(int(input()))

    p.sort()
    j.sort()

    ans = p[0] + j[0] - 50
    print(ans)
    

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
pasta=[int(input())for i in range(3)]
juice=[int(input())for i in range(2)]
p_min=1145141919810
for p in pasta:
    for j in juice:
        if p+j<p_min:p_min=p+j
print(p_min-50)

Submission status: Accepted

Solution code:
pasta = [int(input()) for i in range(3)]
juice = [int(input()) for j in range(2)]
print(min(pasta) + min(juice) - 50)

Submission status: Accepted

Solution code:
def main():
  a = int(input())
  b = int(input())
  c = int(input())
  d = int(input())
  e = int(input())
  
  ans = -50
  if a <= b:
    if a <= c:
      ans += a
    else:
      ans += c
  else:
    if b <= c:
      ans += b
    else:
      ans += c
  
  if d <= e:
    ans += d
  else:
    ans += e
  
  print(ans)
main()

Submission status: Accepted

Solution code:
print(min(int(input()),int(input()),int(input())) + min(int(input()),int(input())) - 50)

Submission status: Accepted

Solution code:
print(min(int(input())for _ in'123')+min(int(input())for _ in'12')-50)

Submission status: Accepted

Solution code:
a=[int(input())for _ in[0]*5]
print(min(a[:3])+min(a[3:])-50)

Submission status: Accepted

Solution code:
# AOJ 0565: Lunch
# Python3 2018.6.30 bal4u

p = [int(input()) for i in range(5)]
print(min(p[:3])+min(p[3:])-50)

Submission status: Accepted

Solution code:
b =[]
for i in range(3):
  a =int(input()) 
  b.append(a)
t = min(b)
c = []
for i in range(2):
  a=int(input())
  c.append(a)
g= min(c)
t += g-50
print t

Submission status: Accepted

Solution code:
a = [int(raw_input()) for x in xrange(5)]
print min(a[0:3]) + min(a[3:5]) - 50

Submission status: Accepted

Solution code:
print min(input() for i in range(3)) + min(input() for i in range(2)) - 50

Submission status: Accepted

Solution code:
L=[input() for i in range(5)]
print min(L[:3])+min(L[3:])-50

Submission status: Accepted

Solution code:
p = [int(raw_input()) for i in range(3)]
j = [int(raw_input()) for i in range(2)]
print str(min(p)+min(j)-50)

Submission status: Accepted

Solution code:
P1 = input()
P2 = input()
P3 = input()
J1 = input()
J2 = input()

print min(P1, P2, P3) + min(J1, J2) - 50

Submission status: Accepted

Solution code:
print min(int(raw_input()), int(raw_input()), int(raw_input())) + min(int(raw_input()), int(raw_input())) - 50

Submission status: Accepted

Solution code:
print min([input() for i in range(3)])+min([input() for i in range(2)]) -50

Submission status: Accepted

Solution code:
print min([input() for i in [1,1,1]])+min([input() for i in [1,1]]) -50

Submission status: Accepted

Solution code:
a=[input() for i in [1]*5]
print min(a[:3])+min(a[3:])-50

Submission status: Accepted

Solution code:
p = min(input(), input(), input())
j = min(input(), input())

print (p + j) - 50

Submission status: Accepted

Solution code:
L = [int(input()) for i in range(5)]
print( min(L[0],L[1],L[2])+ min(L[3],L[4])-50)

Submission status: Accepted

Solution code:
p1, p2, p3, j1, j2=[int(input()) for _ in range(5)]
print(min(p1, p2, p3)+min(j1, j2)-50)

Submission status: Accepted

Solution code:
p1 = int(input())
p2 = int(input())
p3 = int(input())
j1 = int(input())
j2 = int(input())
print(min(p1, p2, p3) + min(j1, j2) - 50)

Submission status: Accepted

Solution code:
num_list = []
daikin = 0
for num in range(3):
    i = int(input())
    num_list.append(i)
num_list.sort()
daikin += num_list[0]
num_list = []
for num1 in range(2):
    i = int(input())
    num_list.append(i)
num_list.sort()
daikin += num_list[0]
daikin -= 50
print(daikin)

Submission status: Accepted

Solution code:
import sys
import math
p1=int(input())
p2=int(input())
p3=int(input())
j1=int(input())
j2=int(input())
p_min=min(p1,p2,p3)
J_min=min(j1,j2)
min_sum=p_min+J_min-50
print(min_sum)

Submission status: Accepted

Solution code:
N=10000
M=10000
for i in range(3):
  N=min(N,int(input()))
for i in range(2):
  M=min(M,int(input()))
print(N+M-50)

Submission status: Accepted

Solution code:
print(min(int(input()) for _ in range(3)) + min(int(input()) for _ in range(2)) - 50)

Submission status: Accepted

Solution code:
p = [int(input()) for _ in range(3)]
j = [int(input()) for _ in range(2)]

print(min(p) + min(j) - 50)

Submission status: Accepted

Solution code:
#A
p = [int(input()) for i in range(3)]
j = [int(input()) for i in range(2)]

print(min(p)+min(j)-50)

Submission status: Accepted

Solution code:
pasta = []
juice = []
for i in range(3):
    a = int(input())
    pasta.append(a)
for j in range(2):
    a = int(input())
    juice.append(a)
pasta.sort()
juice.sort()
print(pasta[0]+juice[0]-50)

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(5)]
print(min(a[0:3])+min(a[3:])-50)

Submission status: Accepted

Solution code:
P_1=int(input())
P_2=int(input())
P_3=int(input())
J_1=int(input())
J_2=int(input())
print(min(P_1,P_2,P_3)+min(J_1,J_2)-50)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

ans = min(A,B,C) + min(D,E) - 50
print(ans)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(min(a,b,c)+min(d,e)-50)

Submission status: Accepted

Solution code:
def main():
    p = min([int(input()) for _ in range(3)])
    j = min([int(input()) for _ in range(2)])
    print(p + j - 50)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
p=[]
j=[]

for i in range(3):
    p.append(int(input()))
for i in range(2):
    j.append(int(input()))
  
    p.sort()
    j.sort()
print(p[0]+j[0]-50)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

p=[a,b,c]
d=[d,e]
print(min(p)+min(d)-50)

Submission status: Accepted

Solution code:
a=[]
b=[]
for i in range(3):
  a.append(int(input()))
  a.sort()
for j in range(3,5):
  b.append(int(input()))
  b.sort()
print(a[0]+b[0]-50)

Submission status: Accepted

Solution code:
menu = []
for _ in range(5):
    price = int(input())
    menu.append(price)

pasta = menu[:3]
drink = menu[3:]

print(min(pasta) + min(drink) - 50)

Submission status: Accepted

Solution code:
pasta = []
juice = []
for i in range(3):
    pasta.append(input())
for j in range(2):
    juice.append(input())
pasta.sort()
juice.sort()
print (pasta[0] + juice[0] - 50)

Submission status: Runtime Error

Solution code:
print min([input() for i in [1,1,1])+min([input() for i in [1,1]]) -50