Problem:


Score : 100 points

Problem Statement

You are given two integers A and B as the input. Output the value of A + B.

However, if A + B is 10 or greater, output error instead.

Constraints

A and B are integers.

1 ≤ A, B ≤ 9

Input

Input is given from Standard Input in the following format:

A B

Output

If A + B is 10 or greater, print the string error (case-sensitive); otherwise, print the value of A + B.

Sample Input 1

6 3

Sample Output 1

9

Sample Input 2

6 4

Sample Output 2

error



Sample input:
6 3


Sample output:
9

Submission status: Runtime Error

Solution code:
num = int(input())

array = []
for i in range(num):
    array.append(int(input()))

point_max = sum(array)
tmp_max = point_max

array_sort = sorted(array)

if point_max % 10 != 0:
    print(point_max)
else:
    for i in array_sort:
        point_max -= i
        if point_max % 10 != 0:
            res = point_max
            break
        else:
            point_max += i
    print(0 if point_max == tmp_max else point_max)

Submission status: Runtime Error

Solution code:
N=int(raw_input())
lis = []
for i in range(0,N):
	lis.append(int(raw_input()))
if sum(lis) % 0 == 0:
	print sum(lis)-min(lis)
else:
	print sum(lis)

Submission status: Runtime Error

Solution code:
S = raw_input()
lis = list(S)
for i in lis:
	mat = []
	if i in S
		print "no"
		break
	mat.add(i)
else:
	print "yes"

Submission status: Runtime Error

Solution code:
    A, B = [int(n) for n in input().split()]
    if A+B < 10:
      print(A+B)
    else:
      print("error")

Submission status: Runtime Error

Solution code:
num1 = input()
num2 = input()
kotae = int(num1) + int(num2)
if kotae >= 10:
   print("error")
else:
   print(kotae)

Submission status: Runtime Error

Solution code:
num1 = input()
num2 = input()
kotae = int(num1) + int(num2)
if kotae >= 10:
   print("eror")
else:
   print(kotae)

Submission status: Runtime Error

Solution code:
num1 = input()
num2 = input()
kotae = int(num1) + int(num2)
if kotae > 10:
   print("eroro")
else:
   print(kotae)

Submission status: Runtime Error

Solution code:
num1 = input()
num2 = input()
kotae = int(num1) + int(num2)
if kotae > 10:
   print("eror")
else:
   print(kotae)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().spkit())
ans = "error" if(a + b >= 10) else a + b
print(ans)

Submission status: Runtime Error

Solution code:
inp = input().split
A = int(inp[0])
B = int(inp[1])
if(A+B >= 10):
  print('error')
else:
  print(A+B)

Submission status: Runtime Error

Solution code:
def read_line():
    return input().rstrip()

def read_ints():
    return [int(x) for x in read_line().split()]

def read_int():
    return int(read_line())

def main():
    a, b = read_int()
    
    c = a + b
    if c >= 10:
        print('error')
    else:
        print(c)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def read_line():
    return input().rstrip()

def read_ints():
    return [int(x) for x in read_line().split()]

def read_int():
    return int(read_line())

a, b = read_int()

c = a + b
if c >= 10:
    print('error')
else:
    print(c)

Submission status: Runtime Error

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(int(input()))
X = sum(S)
while X%10 == 0 and X > 0:
    X -= min(S)
    S.remove(min(S))
print(X)

Submission status: Runtime Error

Solution code:
s = input()
c = 0

#check for constraints
if 2<=len(s) and len(s) <= 26:
    s2 = ''.join(sorted(s))
    for i in s2:
        if c > len(s):
            quit()
        if s2[c] == s2[c+1]:
            print("no")  # string is not unique
            quit()
        elif s2[c] != s2[c+1]:
            c = c + 1
else: quit()

Submission status: Runtime Error

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

total = A+B

if A >= 1 and B <= :
    if total < 10:
        print(total)
    else:
        print('error')

Submission status: Runtime Error

Solution code:
# Widespread
n,a,b = list(map(int, input().split()))
h = []
for i in range(n):
    h.append(int(input()))

import math

sup = sum([hh // a + 1 for hh in h])
inf = 1
 
while sup - inf > 1:
    x = (sup + inf) // 2
    c = sum([math.ceil((hh - x * b)/(a-b)) for hh in h if hh > x * b])
    if c <= x:
        sup = x
    else:
        inf = x
 
print(sup)

Submission status: Runtime Error

Solution code:
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = []
for tmp in range(N):
    s.append(int(input()))
s.sort()
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            total += tmp
    print(0)

Submission status: Runtime Error

Solution code:
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = sorted([ int(input()) for tmp in range(N) ])
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            pass
    print(0)

Submission status: Runtime Error

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

import sys
import subprocess
import json
import time
import math
import re
import sqlite3

A, B = map(int, input().split())
if A + B >= 10: print("error")
else print(A+B)

Submission status: Runtime Error

Solution code:
# -*- coding:utf-8 -*-
import sys, itertools

N = int(input())
Sn = sorted([int(input()) for i in range(N)])

total = sum(Sn)
if total % 10 != 0:
    print(total)
    sys.exit()

sub_set = set(Sn)
for i in range(2, N):
    comb = [sum(l) for l in itertools.combinations(Sn, i)]
    for c in comb:
        sub_set.add(c)

for sub in sorted(sub_set):
    if (total - sub) % 10 != 0:
        print(total - sub)
        break
else:
    print(0)

Submission status: Runtime Error

Solution code:
A,B = input().split(" ")
if A+B >= 10:
    print("error")
else:
    print(A+B)

Submission status: Runtime Error

Solution code:
import math

N, A, B = [int(_) for _ in input().split()]
H = sorted([int(input()) for _ in range(N)])

sup = 10 ** 9
inf = 0

while sup - inf > 1:
    x = (sup + inf) // 2
    c = sum([math.ceil((h - x * B) / (A - B)) for h in H if h > x * B])
    if c <= x:
        sup = x
    else:
        inf = x

print(sup)

Submission status: Runtime Error

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

s=a[0]+a[1]

if s>10 :
    print("error")
else :
    print(s)

Submission status: Runtime Error

Solution code:
import sys
i=0
j=0
k=0
t=0
m=0
s=0
lists=[]
lists2 =[]

#数値の数を受け取る
line = int(input())

#数値を受け取ってリストの作成
while i < line:
	a = int(input())
	#print (a)
	lists.insert(i,a)
	i +=1

#数値の足し合わせ
while j < line:
    s += lists[j]
    j +=1

#正しければ出力
if s%10 != 0:
	print(s)
else:
    #10の倍数以外のリスト作成
    while k < line:
        if lists[k]%10 != 0:
	        lists2.insert(m,lists[k])
	        m +=1
        k +=1
    t = min(lists2)
    print(s-t)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
s=a+b
if s>9 :
    print('error')
else :
    print(s)

Submission status: Runtime Error

Solution code:
a=input()
b=input()

if a+b>9 :
    print('error')
else :
    print(a+b)

Submission status: Runtime Error

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

ans= A + B

print("error" if ans >=10 else ans)

Submission status: Runtime Error

Solution code:
def print_max():
	N = int(input())
	S = [int(input()) for i in range(N)]
	
	if sum(S)%10 != 0:
		print(sum(S))
		return
	S.sort()
	S_n = S[:]
	for i in range(len(S)):
		S_n.pop(i)
		if sum(S_n)%10 != 0:
			print(sum(S_n))
			return
		S_n = S[:]
	print(0)
	return
	
print_max()

Submission status: Runtime Error

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

if A+B > 9:
	print('error')
	return
print(A+B)

Submission status: Runtime Error

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

ans = A + B

printf("error" if ans >=10 else ans)

Submission status: Runtime Error

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

ans=A+B

printf("error" if ans >=10 else ans)

Submission status: Runtime Error

Solution code:
A,B={int(x) for x in input().split(" ")}

ans=A+B

printf("error" if ans >=10 else ans)

Submission status: Runtime Error

Solution code:
A,B={int(x) for x in input().split(" ")}

ans A+B

printf("error" if ans >=10 else ans)

Submission status: Runtime Error

Solution code:
a,b = [int(x) for x in sys.stdin.readline().split()]

if a+b <= 9:
	print(a+b)
else:
	print('error')

Submission status: Runtime Error

Solution code:
a, b = map(int, raw_input().split())
if(a+b<11):
    print(a+b)
else:
    print("error")

Submission status: Runtime Error

Solution code:
import math
 
def check(x):
    k = 0
    global h, a, b
    for i in h:
        if x * b < i:
            k += math.ceil((i - x * b) / (a - b))
    return k <= x
 
 
n, a, b = map(int, input().split())
h = []
for i in range(n):
    h.append(int(input()))
l = -1
r = max(h) // b + 1
while r - l > 1:
    m = (l + r) // 2
    if check(m):
        r = m
    else:
        l = m
print(r)

Submission status: Runtime Error

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

if( (a+b) >= 10):
    print("error")
else:
    print(A+B)

Submission status: Runtime Error

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

if( (a+b) >= 10):
    print("error")
else:
    print(A+B)

Submission status: Runtime Error

Solution code:
import numpy as np

n, a, b = map(int, raw_input().split())
l = []

for i in range(n):
	l.append(input())
ll = np.array(l)
ll.sort()
ll = ll[::-1]

def solve(hp, count):
	q = hp - b * count
	t = q > 0

	if a > b:
		p = (q - 1) / (a - b) + 1
	else:
		p = q
	p = p[p > 0]
	if p.sum() <= count:
		return True
	else:
		return False

l = 1
r = ll[0] / b + 1
while r - l > 1:
	m = (l + r) / 2
	if solve(hp, m):
		r = m
	else:
		l = m

if r == 2:
	if solve(hp, 1):
		r = 1

print r

Submission status: Runtime Error

Solution code:
data=[]
for i in range(int(input())):
    data.append(int(input()))
un=[num for num in data if num%10==0]
data=[num for num in data if num%10!=0]
if len(data)==0:
    print(0)
else:
    if sum(un+data)%10!=0:
        print(sum(un+data))
    else:
        print(sum(un+data)-min(data))

Submission status: Runtime Error

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

A, B = map(int, input())

[print(A+B) if A+B < 10 else print('error')]

Submission status: Runtime Error

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

A = int(input())
B = int(input())

[print(A+B) if A+B < 10 else print('error')]

Submission status: Runtime Error

Solution code:
testSNs = raw_input().split()
SCORE=int(0)
for x in range(testSNs[0]):
    if not testSNs[x]%10 is 0:
        SCORE += testSNs[x]
    else:
        continue
print(SCORE)

Submission status: Runtime Error

Solution code:
import heapq
N,A,B = map(int, input().split())
H = []
for i in range(N):
 heapq.heappush(H,  - int(input()))

cnt = 0
def atack(H):
 global cnt
 H = list(map(lambda x:x+B, H))
 h = heapq.heapreplace(H, H[0] + A - B)
 cnt += 1
 return H

while H[0] < 0:
 H = atack(H)

print(str(cnt))

Submission status: Runtime Error

Solution code:
N = int(input())
a = [int(input()) for i in range(N)]

a.sort()
ans = sum(a)
for i in range(len(a)):
    if ans % 10 == 0:
        ans = ans - a[i]
print (ans)

Submission status: Runtime Error

Solution code:
文字列を取り込む。
文字数を数える。
文字列をソートする。
最初の文字と二番目の文字が同じかどうか確認する。
同じならば'NO'を出力する。
違うならば二番目の文字列と三番目の文字列が同じかどうか確認する。
同じならば'NO'を出力する。
・
・
・
最後から一つ前の文字と最後の文字を確認して違うならば
'YES'を出力する。

Submission status: Runtime Error

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

A = int(input())
B = int(input())

sum = A + B

if sum <= 10:
    print(sum)

elif sum > 10:
    print("error")

Submission status: Runtime Error

Solution code:
#Python

A = map(int, raw_input().split())
if A[0]+A[1]>=10:
	print ‘error’
else:
	print A[0]+A[1]

Submission status: Runtime Error

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

if (A+B) >= 10:
    print("error")
else:
    print(A+B)

Submission status: Runtime Error

Solution code:
#coding:utf-8

input_line1 = raw_input()
input_line2 = raw_input()

if input_line1 + input_line2 >= 10:
	print 'error'

else:
	print input_line1 + input_line2

Submission status: Runtime Error

Solution code:
a= int(input())
b=int(input())
if a+b >= 10:
    print('error')
else:
    print(a+b)