AtCoder Beginner Contest 063 - Restricted

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-----
6 3

-----Sample Output-----
9

Difficulty: EASY

Starter code:

Solutions:
(A, B) = map(int, input().split())
if A + B < 10:
	print(A + B)
else:
	print('error')


a = list(map(int, input().split()))
print('error' if sum(a) >= 10 else sum(a))


(p, q) = map(int, input().split())
print(p + q if p + q < 10 else 'error')


s = sum(map(int, input().split()))
print(s if s < 10 else 'error')


(a, s) = map(int, input().split())
if a + s >= 10:
	print('error')
else:
	print(a + s)


ans = sum(map(int, input().split()))
print('error' if ans >= 10 else ans)


(a, b) = map(int, input().split())
print(a + b if a + b < 10 else 'error')


(A, B) = map(int, input().split())
S = A + B
print(S if S <= 9 else 'error')


(a, b) = map(int, input().split())
print([a + b, 'error'][a + b >= 10])


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


a = sum(map(int, input().split()))
print([a, 'error'][a >= 10])


(A, B) = (int(T) for T in input().split())
print([A + B, 'error'][A + B >= 10])


z = eval(input().replace(' ', '+'))
print(z // 10 * 'error' or z)


(a, b) = list(map(int, input().split()))
print(a + b if a + b <= 9 else 'error')


(x, y) = map(int, input().split())
print('error' if x + y >= 10 else x + y)


x = sum(map(int, input().split()))
print(x if x < 10 else 'error')


num = sum(list(map(int, input().split())))
print('error' if num >= 10 else num)


a = int(eval(input().replace(' ', '+')))
print(a if a < 10 else 'error')


v = sum(map(int, input().split()))
print([v, 'error'][v > 9])


(n, m) = map(int, input().split())
print(n + m) if n + m < 10 else print('error')


C = sum(map(int, input().split()))
print(C if C < 10 else 'error')


LI = lambda : list(map(int, input().split()))
(A, B) = LI()

def main():
	ans = A + B
	if ans >= 10:
		ans = 'error'
	print(ans)

def __starting_point():
	main()
__starting_point()


(a, b) = map(int, input().split())
print([a + b, 'error'][a + b > 9])


n = sum(list(map(int, input().split())))
print([n, 'error'][n >= 10])


k = sum(map(int, input().split()))
print([k, 'error'][k > 9])


a = eval(input().replace(' ', '+'))
print(a * (a < 10) or 'error')


x = eval(input().replace(' ', '+'))
if x < 10:
	print(x)
else:
	print('error')


(N, T) = map(int, input().split())
print(N + T if N + T < 10 else 'error')


(a, b) = list(map(int, input().split()))
ans = a + b if a + b < 10 else 'error'
print(ans)


v = sum(map(int, input().split()))
print([v, 'error'][v // 10])


(n, k) = map(int, input().split())
if n + k < 10:
	print(n + k)
else:
	print('error')


n = eval(input().replace(' ', '+'))
print([n, 'error'][n > 9])


(a, b) = list(map(int, input().split()))
result = 'error'
if a + b < 10:
	result = a + b
print(result)


ab = sum(map(int, input().split()))
print('error' if ab >= 10 else ab)


A = sum(map(int, input().split()))
print('error' if 9 < A else A)


s = sum((int(x) for x in input().split()))
print('error' if s >= 10 else s)


(a, b) = [int(i) for i in input().split()]
print(a + b if a + b < 10 else 'error')


n = list(map(int, input().split()))
print('error' if sum(n) >= 10 else sum(n))


r = eval(input().replace(' ', '+'))
print('error' if r >= 10 else r)


(N, K) = map(int, input().split())
print(N + K if N + K < 10 else 'error')


v = sum(map(ord, input())) - 128
print([v, 'error'][9 < v])


x = sum(map(int, input()[::2]))
print(['error', x][x < 10])


s = sum(map(int, input().split()))
print('error' if s > 9 else s)


a = sum([int(x) for x in input().split()])
if a >= 10:
	a = 'error'
print(a)


A = list(map(int, input().split()))
print(sum(A) if sum(A) < 10 else 'error')


(x, y) = map(int, input().split())
print((x + y > 9) * 'error' or x + y)


def iroha():
	(a, b) = list(map(int, input().split()))
	ans = a + b
	print(ans if ans < 10 else 'error')

def __starting_point():
	iroha()
__starting_point()


S_list = list(map(int, input().split()))
add = S_list[0] + S_list[1]
if add >= 10:
	result = 'error'
else:
	result = add
print(result)


v = sum(map(ord, input())) & 31
print([v, 'error'][9 < v])


(x, y, z) = input()
w = eval(x + '+' + z)
print(w // 10 * 'error' or w)


(A, B) = [int(x) for x in input().split()]
c = A + B
print(c if c < 10 else 'error')


(a, b) = map(int, input().split())
ans = 'error'
if a + b <= 9:
	ans = a + b
print(ans)


n = eval(input().replace(' ', '+'))
print(['error', n][n < 10])


k = eval(input().replace(' ', '+'))
print(k if k < 10 else 'error')


s = eval(input().replace(' ', '+'))
print(['error', s][s < 10])


s = eval(input().replace(' ', '+'))
print(s if s < 10 else 'error')


v = eval(input().replace(*' +'))
print([v, 'error'][9 < v])


a = eval(input().replace(' ', '+'))
print([a, 'error'][a > 9])


n = sum(map(int, input().split()))
print([n, 'error'][n > 9])


s = input()
a = int(s[0]) + int(s[-1])
print('error' if a > 9 else a)


A = eval(input().replace(' ', '+'))
print(A if A < 10 else 'error')


(a, b) = map(int, input().split())
c = a + b
if c >= 10:
	c = 'error'
print(c)


a = eval(input().replace(' ', '+'))
print('error' if a > 9 else a)


a = sum(map(int, input().split()))
print((a, 'error')[a > 9])


x = input()
z = eval(x[0] + '+' + x[2])
print(z // 10 * 'error' or z)


S = sum(map(int, input().split()))
print(S if S < 10 else 'error')


(A, B) = map(int, input().split())
print([A + B, 'error'][A + B > 9])


(x, y) = map(int, input().split())
print('error' if x + y > 9 else x + y)


c = eval(input().replace(' ', '+'))
print(c * (c < 10) or 'error')


def main():
	(a, b) = list(map(int, input().split()))
	print(a + b if a + b < 10 else 'error')

def __starting_point():
	main()
__starting_point()


import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

def si():
	return input()

def ii():
	return int(input())

def fi():
	return float(input())

def lstr():
	return input().split()

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

def lintdec():
	return list(map(lambda x: int(x) - 1, input().split()))

def lnstr(n):
	return [input() for _ in range(n)]

def lnint(n):
	return [int(input()) for _ in range(n)]

def lint_list(n):
	return [lint() for _ in range(n)]
(A, B) = lint()
print(A + B if A + B < 10 else 'error')


N = sum(map(int, input().split()))
print(N if N < 10 else 'error')


(x, y, z) = input()
w = int(x) + int(z)
print(w // 10 * 'error' or w)


(a, b) = map(int, input().split())
ans = a + b
if ans >= 10:
	ans = 'error'
print(ans)


(A, B) = map(int, input().split())
print(['error', A + B][A + B < 10])


l = input().split()
ans = int(l[0]) + int(l[1])
if 10 <= ans:
	print('error')
else:
	print(ans)


(A, B) = [int(i) for i in input().split()]
print(A + B if A + B < 10 else 'error')


(A, B) = map(int, input().split())
if 1 <= A and B <= 9:
	if A + B >= 10:
		print('error')
	else:
		print(A + B)


(int_1, int_2) = map(int, input().split())
answer = int_1 + int_2
if 10 <= answer:
	print('error')
else:
	print(answer)


n = sum(map(int, input().split()))
print('error' if n > 9 else n)


import sys
input = sys.stdin.readline
(a, b) = list(map(int, input().split()))
ab = a + b
if ab >= 10:
	print('error')
else:
	print(ab)


a = list(map(int, input().split()))
if a[0] + a[1] < 10:
	print(a[0] + a[1])
else:
	print('error')


x = sum(map(int, input()[::2]))
print(x if x < 10 else 'error')


su = sum(list(map(int, input().split())))
print(su if su <= 9 else 'error')