Problem:


得点

問題

JOI高校の2人の生徒 A さんと B さんは，情報，数学，理科，英語の4教科の試験を受けた． A さんと B さんのこれら4教科の得点が与えられると， Aさんの合計点 S と Bさんの合計点 T のうち大きな方を出力するプログラムを作成せよ．ただし，同点の場合は S (= T) を出力せよ．

入力

入力は2行からなる．

1行目は4つの整数が1つの空白を区切りとして書かれており，それぞれ順に， A さんの情報の得点，数学の得点，理科の得点，英語の得点を表している．

2行目は4つの整数が1つの空白を区切りとして書かれており，それぞれ順に， B さんの情報の得点，数学の得点，理科の得点，英語の得点を表している．

どの教科の得点も100点満点で，負の得点が与えられることはない．

出力

出力は, 求める1つの整数からなる.

入出力例

入力例1

100 80 70 60
80 70 80 90

出力例1

  

320

入力例2

100 80 70 60
80 70 60 100

出力例2

310

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



Sample input:
100 80 70 60
80 70 80 90


Sample output:
320

Submission status: Wrong Answer

Solution code:
data_map = [[1]*4]
for i in range(4000):
  add_item = [
    data_map[-1][0],
    data_map[-1][0] + data_map[-1][1],
    data_map[-1][0] + data_map[-1][1] + data_map[-1][2],
    data_map[-1][0] + data_map[-1][1] + data_map[-1][2] + data_map[-1][3]
  ]
  data_map.append(add_item)

while True:
  try:
    line = int(raw_input())
  except:
    break
  print data_map[line][3]

Submission status: Accepted

Solution code:
a=list(map(int, input().split()))
b=list(map(int, input().split()))
if sum(b)<=sum(a):
  print(sum(a))
else:
  print(sum(b))

Submission status: Accepted

Solution code:
a_score = sum(map(int, raw_input().split()))
b_score = sum(map(int, raw_input().split()))

if a_score > b_score: print a_score
else:                 print b_score

Submission status: Accepted

Solution code:
A = map(int,raw_input().split())
B = map(int,raw_input().split())
S = sum(A)
T = sum(B)
print max([S,T])

Submission status: Accepted

Solution code:
import sys
f = sys.stdin

s, t = [sum(map(int, f.readline().split())) for _ in range(2)]
print(s if s >= t else t)

Submission status: Accepted

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

a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

ret = max(sum(a), sum(b))

print(ret)

Submission status: Accepted

Solution code:
print max(sum([ int(_) for _ in raw_input().split()]),sum([ int(_) for _ in raw_input().split()]) )

Submission status: Accepted

Solution code:
print max([sum(map(int, raw_input().split())) for i in range(2)])

Submission status: Accepted

Solution code:
a1,b1,c1,d1 = map(int,raw_input().split())
a2,b2,c2,d2 = map(int,raw_input().split())
print max(a1+b1+c1+d1,a2+b2+c2+d2)

Submission status: Accepted

Solution code:
A=raw_input()
S=0
X=0
for i in A:
    if(i==" "):
        S+=X
        X=0
    else:
        X*=10
        X+=int(i)
S+=X
B=raw_input()
T=0
Y=0
for i in B:
    if(i==" "):
        T+=Y
        Y=0
    else:
        Y*=10
        Y+=int(i)
T+=Y
if(S>T):
    print(S)
else:
    print(T)

Submission status: Accepted

Solution code:
a1 = map(int,raw_input().split());
b1 = map(int,raw_input().split());
a2 = 0
b2 = 0
for n in range(4):
    a2 += a1[n]
    b2 += b1[n]
print max(a2,b2)

Submission status: Accepted

Solution code:
s = sum([int(x) for x in input().split(' ')])
t = sum([int(x) for x in input().split(' ')])
print(max(s, t))

Submission status: Accepted

Solution code:
a=[0 for i in range(2)]
b=[0,0]

for i in range(2):
	a[i]=input().split()
	for j in range(4):
		b[i]+=int(a[i][j])
print(max(b))

Submission status: Accepted

Solution code:
print(max(sum(map(int, input().split())) for _ in range(2)))

Submission status: Accepted

Solution code:
culc_score = lambda :sum(int(score) for score in input().split())
x = culc_score()
y = culc_score()
print(x if x > y else y)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    # ??????????????\???
    scores_a = [int(x) for x in input().split(' ')]
    scores_b = [int(x) for x in input().split(' ')]

    # ???????????????
    # ???????????????
    print('{0}'.format(max(sum(scores_a), sum(scores_b))))

Submission status: Accepted

Solution code:
print(max(sum(map(int,input().split())),sum(map(int,input().split()))))

Submission status: Accepted

Solution code:
scores = [list(map(int, input().split())) for _ in range(2)]
print(max(sum(scores[0]), sum(scores[1])))

Submission status: Accepted

Solution code:
a = map(int, input().split())
b = map(int, input().split())
suma = sum(a)
sumb = sum(b)
if suma>sumb:
    print(suma)
else:
    print(sumb)

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
B = list(map(int, input().split()))
max_sum = max([sum(A), sum(B)])
print(max_sum)

Submission status: Accepted

Solution code:
A, B = [list(map(int, input().split())) for _ in range(2)]
print(max([sum(A), sum(B)]))

Submission status: Accepted

Solution code:
print(max(sum(map(int, input().split())), sum(map(int, input().split()))))

Submission status: Accepted

Solution code:
def main():
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    aa = 0
    for x in range(len(a)):
        aa += a[x]
    bb = 0
    for x in range(len(b)):
        bb += b[x]
    if aa >= bb:
        print(aa)
    else:
        print(bb)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

def sum(x):
    sum = 0
    for i in range(4):
        sum += x[i]
    return sum

A = sum(a)
B = sum(b)

print(A if A > B else B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A_points = [int(i) for i in input().split(' ') ]
B_points = [int(i) for i in input().split(' ') ]

if sum(A_points) < sum(B_points):
    print(sum(B_points))

else:
    print(sum(A_points))

Submission status: Accepted

Solution code:
# coding: utf-8

a = map(int, raw_input().split())
b = map(int, raw_input().split())

a_sum = sum(a)
b_sum = sum(b)

if a_sum > b_sum:
	print(a_sum)
else:
	print(b_sum)

Submission status: Accepted

Solution code:
print(max(sum(map(int, input().split())) for _ in range(2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(max(sum(map(int,input().split()))for _ in'12'))

Submission status: Accepted

Solution code:
# AOJ 0510: Score
# Python3 2018.6.29 bal4u

sa = sum(list(map(int, input().split())))
sb = sum(list(map(int, input().split())))
print(sa if sa >= sb else sb)

Submission status: Accepted

Solution code:
a = map(int,raw_input().split())
b = map(int,raw_input().split())
s = a[0]+a[1]+a[2]+a[3]
t = b[0]+b[1]+b[2]+b[3]

if s > t or s ==t :print s
elif s < t:print t

Submission status: Accepted

Solution code:
a = raw_input()
A = []
b = raw_input()
B = []
for i in a.split():
    A.append(int(i))
for i in b.split():
    B.append(int(i))

if  sum(A) > sum(B):
    print sum(A)
else:
    print sum(B)

Submission status: Accepted

Solution code:
magro = 0

saba = []
saba=map(int,raw_input().split(' '))
#print("ika")
ika=map(int,raw_input().split(' '))
print(max(sum(saba), sum(ika)))
neko = 0
hage = 90

Submission status: Accepted

Solution code:
f=lambda:sum(map(int,raw_input().split()))
a,b=f(),f()
print "%d"%(a if a>b else b)

Submission status: Accepted

Solution code:
a=sum(map(int,raw_input().split()))
b=sum(map(int,raw_input().split()))
print a	if a>b else b

Submission status: Accepted

Solution code:
a=sum(map(int, raw_input().split()))
b=sum(map(int, raw_input().split()))
print max(a,b)

Submission status: Accepted

Solution code:
import sys



def solve():
    a = map(int,raw_input().split())
    b = map(int,raw_input().split())
    if sum(a) > sum(b):
        print sum(a)
    else:
        print sum(b)        
                                              
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
s = sum(map(int, raw_input().split()))
t = sum(map(int, raw_input().split()))
print max(s, t)

Submission status: Accepted

Solution code:
a = sum(map(int, raw_input().split()))
b = sum(map(int, raw_input().split()))
print max(a, b)

Submission status: Accepted

Solution code:
print max([sum(map(int, raw_input().split())) for i in xrange(2)])

Submission status: Accepted

Solution code:
a = sum(map(int, raw_input().split()))
b = sum(map(int, raw_input().split()))
print (max(a,b))

Submission status: Accepted

Solution code:
s = map(int, raw_input().split())
t = map(int, raw_input().split())
print max(sum(s),sum(t))

Submission status: Accepted

Solution code:
t1 = sum(map(int,input().split(' ')))
t2 = sum(map(int,input().split(' ')))
print(max(t1,t2))

Submission status: Accepted

Solution code:
a,b,c,d  = map(int,input().split())
x,y,z,w  = map(int,input().split())

A = a+b+c+d
B = x+y+z+w

print(max(A,B))

Submission status: Accepted

Solution code:
A = list(map(int,input().split()))
B = list(map(int,input().split()))
t = sum(A)
s = sum(B)
if t>=s:
	print(t)
else:
	print(s)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
i1,m1,p1,e1=map(int,input().split())
i2,m2,p2,e2=map(int,input().split())

S=i1+m1+p1+e1
T=i2+m2+p2+e2

S,T=sorted([S,T])

print(T)

Submission status: Accepted

Solution code:
num_list = []
for num in range(2):
    kei = 0
    num_line = input().split(" ")
    for num1 in range(0,4):
        kei += int(num_line[num1])
    num_list.append(kei)
num_list.sort()
print(num_list[1])

Submission status: Accepted

Solution code:
import sys
ia,ma,sa,ea=map(int,input().split())
ib,mb,sb,eb=map(int,input().split())
sum_a=ia+ma+sa+ea
sum_b=ib+mb+sb+eb
if(sum_a>=sum_b):
    print(sum_a)
else:
    print(sum_b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = sum([int(i) for i in input().split()])
t = sum([int(i) for i in input().split()])

print(s) if s >= t else print(t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = sum(a)
d = sum(b)
if c < d:
    print(d)
else:
    print(c)

Submission status: Accepted

Solution code:
s1 = sum([ int(s) for s in input().split() ])
s2 = sum([ int(s) for s in input().split() ])

print(max(s1,s2))

Submission status: Accepted

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


print(max(sum(A),sum(B)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a1, a2, a3, a4 = map(int,input().split())
b1, b2, b3, b4 = map(int,input().split())

S = a1 + a2 + a3 + a4
T = b1 + b2 + b3 + b4
print(max(S,T))

Submission status: Accepted

Solution code:
def main():
    print(max(sum([int(x) for x in input().split()]), sum([int(y) for y in input().split()])))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print(max(sum(map(int,input().split())),sum(map(int,input().split()))))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
b=list(map(int,input().split()))
if sum(a)<sum(b):
	print(sum(b))
else:
	print(sum(a))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
b=list(map(int,input().split()))
if sum(a)>sum(b):
  print(sum(a))
else:
  print(sum(b))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
e,f,g,h=map(int,input().split())
A=a+b+c+d
B=e+f+g+h
if A==B or A>B:
    print(A)
else:
    print(B)

Submission status: Accepted

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

print(max(s, t))

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split(" "))
e,f,g,h = map(int,input().split(" "))
if a+b+c+d >= e+f+g+h:
  print(a+b+c+d)
else:
  print(e+f+g+h)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
e,f,g,h=map(int,input().split())
S=a+b+c+d
T=e+f+g+h
if S>T :
    print(S)
else :
    print(T)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
if sum(a) > sum(b) or sum(a) == sum(b): print(sum(a))
else: print(sum(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
alist = [int(s) for s in input().strip().split(' ')]
blist = [int(s) for s in input().strip().split(' ')]
print(max(sum(alist), sum(blist)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os
line = list(map(int, input().split()))
S = line[0] + line[1] + line[2] + line[3]

line1 = list(map(int, input().split()))
T = line1[0] + line1[1] + line1[2] + line1[3]

if S >= T:
    print(S)
else:
    print(T)

Submission status: Accepted

Solution code:
a = map(int, raw_input().split())
b = map(int, raw_input().split())
alla = a[0] + a[1] + a[2] + a[3]
allb = b[0] + b[1] + b[2] + b[3]
if alla > allb:
	print alla
else:
	print allb

Submission status: Runtime Error

Solution code:
while True:
  a,b,c,d=map(int,input().split())
  e,f,g,h=map(int,input().split())
  x=a+b+c+d
  y=e+f+g+h
  if x<y:
    print(y)
  else:
    print(x)

Submission status: Runtime Error

Solution code:
while True:
  a,b,c,d=map(int,input().split())
  e,f,g,h=map(int,input().split())
  x=a+b+c+d
  y=e+f+g+h
  if x<=y:
    print(y)
  else:
    print(x)

Submission status: Runtime Error

Solution code:
A = list(map(input().split())
B = list(map(input().split())
max = max([max(A), max(B)])
print(max)

Submission status: Runtime Error

Solution code:
A = list(map(input().split()))
B = list(map(input().split()))
max = max([max(A), max(B)])
print(max)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
magro = 0

saba = []
saba=map(int,raw_input().split(‘ ‘))
#print(“ika”)
ika=map(int,raw_input().split(‘ ‘))
print(max(sum(saba), sum(ika)))
neko = 0
hage = 90

Submission status: Runtime Error

Solution code:
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//$fp = fopen("input.txt", "r");
$fp = fopen("php://stdin", "r");

$str = explode(" ", rtrim(fgets($fp)));
$sum_a = 0;
for($i = 0; $i < 4; $i++) {
    $sum_a += (int)($str[$i]);
}
$str = explode(" ", rtrim(fgets($fp)));
$sum_b = 0;
for($i = 0; $i < 4; $i++) {
    $sum_b += (int)($str[$i]);
}
echo $sum_a > $sum_b ? $sum_a : $sum_b . "\n";
?>

Submission status: Runtime Error

Solution code:
from sys import stdin
print max(map(sum,map(lambda s: map(int,s.split(' ')), stdin.read().split('\n'))))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = sum(map(int, raw_input().split())
t = sum(map(int, raw_input().split())
print max(s,t)