AtCoder Beginner Contest 050 - Addition and Subtraction Easy

Joisino wants to evaluate the formula "A op B".
Here, A and B are integers, and the binary operator op is either + or -.
Your task is to evaluate the formula instead of her.

-----Constraints-----
 - 1≦A,B≦10^9
 - op is either + or -.

-----Input-----
The input is given from Standard Input in the following format:
A op B

-----Output-----
Evaluate the formula and print the result.

-----Sample Input-----
1 + 2

-----Sample Output-----
3

Since 1 + 2 = 3, the output should be 3.

Source: atcoder | Difficulty: EASY


Solutions:
(a, b, c) = map(str, input().split())
a = int(a)
c = int(c)
if b == '+':
	print(a + c)
else:
	print(a - c)


(A, op, B) = input().split()
(A, B) = (int(A), int(B))
print(A + B if op == '+' else A - B)


(a, op, b) = input().split()
print(int(a) + int(b) if op == '+' else int(a) - int(b))


print(eval(input().strip()))


(a, o, b) = input().split()
print(int(a) + int(b) if o == '+' else int(a) - int(b))


(a, b, c) = list(input().split(' '))
print(eval(a + b + c))


S = input().split()
print(eval(''.join(S)))


(a, o, p) = input().split()
a = int(a)
p = int(p)
if o == '+':
	print(a + p)
else:
	print(a - p)


(a, op, b) = input().split(' ')
print(eval(a + op + b))


(A, op, B) = list(map(str, input().split()))
if op == '+':
	print(int(A) + int(B))
elif op == '-':
	print(int(A) - int(B))


(A, O, B) = map(str, input().split())
print([int(A) + int(B), int(A) - int(B)][O == '-'])


print(eval(input().replace(' ', '')))


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


(a, b, c) = input().split()
a = int(a)
c = int(c)
if b == '-':
	print(a - c)
else:
	print(a + c)


(A, op, B) = input().split()
if op == '+':
	print(int(A) + int(B))
elif op == '-':
	print(int(A) - int(B))


A = input()
print(eval(A))


(x, y, z) = input().split()
if y == '+':
	print(int(x) + int(z))
else:
	print(int(x) - int(z))


(a, o, b) = input().split()
print(int(a) + int(b) * [-1, 1][o == '+'])


s = input()
print(eval(s))


a = list(input().split())
a[0] = int(a[0])
a[2] = int(a[2])
if a[1] == '+':
	print(a[0] + a[2])
else:
	print(a[0] - a[2])


(a, op, b) = input().split()
d = {'+': 1, '-': -1}
print(int(a) + d[op] * int(b))


(a, x, b) = map(str, input().split())
c = int(a)
d = int(b)
if x == '+':
	print(c + d)
else:
	print(c - d)


(a, op, b) = list(map(str, input().split()))
a = int(a)
b = int(b)
if op == '+':
	print(a + b)
elif op == '-':
	print(a - b)


(A, op, B) = input().rstrip().split()
print(eval(A + op + B))


(a, b, c) = input().split()
print([int(a) + int(c), int(a) - int(c)][b == '-'])


S_list = list(input().split())
if S_list[1] == '+':
	result = int(S_list[0]) + int(S_list[2])
else:
	result = int(S_list[0]) - int(S_list[2])
print(result)


s = list(input().split())
print(eval(''.join(s)))


(a, op, b) = list(map(str, input().split()))
if op == '+':
	print(int(a) + int(b))
else:
	print(int(a) - int(b))


s = input()
s = s.split(' ')
a = s[0]
b = s[1] + s[2]
print(int(a) + int(b))


a = input()
print(eval(a))


str = input()
print(eval(str))


(A, op, B) = map(str, input().split())
calc = eval(A + op + B)
print(int(calc))


(a, x, b) = map(str, input().split())
if x == '+':
	print(int(a) + int(b))
else:
	print(int(a) - int(b))


print(eval(input()))


(m, op, n) = input().split()
if op == '+':
	print(int(m) + int(n))
else:
	print(int(m) - int(n))


st = input()
print(eval(st))


(a, p, b) = input().split()
(a, b) = (int(a), int(b))
print(eval('{}{}{}'.format(a, p, b)))


txt = input()
print(eval(txt))


(A, o, B) = input().split()
(A, B) = (int(A), int(B))
if o == '+':
	print(A + B)
else:
	print(A - B)


(o, p, q) = map(str, input().split())
a = int(o)
b = int(q)
print(a + b if p == '+' else a - b)


li = []
li = input().split()
print(int(li[0]) + int(li[1] + li[2]))


[a, op, b] = list(input().split())
siki = a + op + b
print(eval(siki))


ans = eval(input())
print(ans)


func = eval(input())
print(func)


(a, p, b) = map(str, input().split())
print(int(a) + int(b) if p == '+' else int(a) - int(b))


(A, o, B) = input().split(' ')
ans = int(A) + int(o + B)
print(ans)


s = input().split()
print(int(s[0]) + int(s[2])) if s[1] == '+' else print(int(s[0]) - int(s[2]))


print(eval(''.join(input().split())))


L = list(map(str, input().split()))
if L[1] == '+':
	print(int(L[0]) + int(L[2]))
else:
	print(int(L[0]) - int(L[2]))


s = input()
a = eval(s)
print(a)


l = input()
print(eval(l))


(a, op, b) = input().split()
print([int(a) + int(b), int(a) - int(b)][op == '-'])


(s, o, t) = input().split()
if o == '+':
	a = int(s) + int(t)
else:
	a = int(s) - int(t)
print(a)


s = input().replace(' ', '')
print(eval(s))


(a, x, b) = input().split()
print(int(a) + int(b)) if x == '+' else print(int(a) - int(b))


(a, b, c) = map(str, input().split())
ans = eval(a + b + c)
print(ans)


(a, o, b) = input().split()
x = int(a)
y = int(b)
print(x + y if o == '+' else x - y)


(x, op, y) = input().split()
x = int(x)
y = int(y)
print(x + y if op == '+' else x - y)


s = input()
f = '+' in s
(a, b) = map(int, s.split('-+'[f]))
print(a + b if f else a - b)


(A, op, B) = input().split()
a = int(A)
b = int(B)
if op == '+':
	print(a + b)
else:
	print(a - b)


f = input().replace(' ', '')
print(eval(f))


(a, op, b) = map(str, input().split())
a = int(a)
b = int(b)
if op == '+':
	result = a + b
else:
	result = a - b
print(result)


def main():
	(a, op, b) = input().split()
	(a, b) = (int(a), int(b))
	if op == '+':
		ans = a + b
	elif op == '-':
		ans = a - b
	print(ans)
main()


import sys
input = sys.stdin.readline
AopB = input()
print(eval(AopB))


S = str(input())
print(eval(S))


siki = input()
print(eval(siki))


s = input()
(a, op, b) = s.split()
a = int(a)
b = int(b)
if op == '+':
	c = a + b
else:
	c = a - b
print(c)


(a, b, c) = input().split()
print(eval(str(a) + b + str(c)))


def main():
	print(eval(input()))
main()


import sys
s = input()
print(eval(s))


(A, op, B) = map(str, input().split())
A = int(A)
B = int(B)
if op == '+':
	print(A + B)
else:
	print(A - B)


(a, op, b) = input().split()
(a, b) = (int(a), int(b))
if op == '+':
	ans = a + b
elif op == '-':
	ans = a - b
print(ans)


c = input()
print(eval(c))


(A, op, B) = map(str, input().split())
print(int(A) + int(op + B))


S = input()
print(eval(S))


(a, op, b) = map(str, input().split())
eq = a + op + b
print(eval(eq))


(x, cal, y) = input().split()
print(int(x) + int(y) if cal == '+' else int(x) - int(y))


(A, B, C) = map(str, input().split())
print(int(A) + int(C) if B == '+' else int(A) - int(C))


(A, c, B) = input().split()
A = int(A)
B = int(B)
if c == '+':
	print(A + B)
elif c == '-':
	print(A - B)


data = list(input().split())
if data[1] == '+':
	print(int(data[0]) + int(data[2]))
elif data[1] == '-':
	print(int(data[0]) - int(data[2]))


(a, s, d) = input().split()
if s == '+':
	print(int(a) + int(d))
else:
	print(int(a) - int(d))


expr = input()
print(eval(expr))


S = ''.join(input())
print(eval(S))


(a, s, b) = map(str, input().split())
r = eval(a + s + b)
print(r)


(A, op, B) = map(str, input().split())
C = A + op + B
print(eval(C))


(a, s, b) = input().split()
(a, b) = map(int, [a, b])
if s == '+':
	print(a + b)
else:
	print(a - b)


print(eval(input().rstrip()))


(a, op, b) = open(0).read().split()
print(eval(a + op + b))


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


exec('print(' + input() + ')')


S = input().strip()
print(eval(S))


(a, b, c) = input().split()
A = int(a)
B = int(c)
if b == '+':
	print(A + B)
else:
	print(A - B)


(a, b, c) = input().split()
print(eval('{}{}{}'.format(a, b, c)))


print(eval(''.join(input().strip().split(' '))))


(A, op, B) = input().split()
A = int(A)
B = int(B)
if (1 <= A & A <= 10 ** 9) & (1 <= B & B <= 10 ** 9) & ((op == '+') | (op == '-')):
	if op == '+':
		result = A + B
	elif op == '-':
		result = A - B
	print(result)


(a, x, b) = input().split()
print(eval(a + x + b))


(A, op, B) = map(str, input().split())
a = A + op + B
print(eval(a))


s = input()
ans = eval(s)
print(ans)


ans = eval(str(input()))
print(ans)


(a, b, c) = list(map(str, input().split()))
a = int(a)
c = int(c)
if b == '+':
	print(a + c)
elif b == '-':
	print(a - c)


formula = ''.join(list(input().split()))
print(eval(formula))


li = input().split()
print(eval(li[0] + li[1] + li[2]))


(a, b, c) = [i for i in input().split()]
print(int(a) + int(c) * (1 if b == '+' else -1))


my_input = str(input())
print(str(eval(my_input)))


(a, o, b) = input().split()
print(eval(a + o + b))


print(str(eval(''.join([str(x) for x in input().split(' ')]))))


input_ = eval(input())
print(input_)


def calculate(a, b, op):
	if op == '+':
		return a + b
	else:
		return a - b
lst = list(map(str, input().split()))
print(calculate(int(lst[0]), int(lst[2]), lst[1]))


A = input().split()
B = int(A[0])
C = int(A[2])
if A[1] == '+':
	print(B + C)
else:
	print(B - C)


(a, op, b) = list(map(str, input().split()))
result = eval(a + op + b)
print(int(result))


s = input()
if '+' in s:
	index = s.index('+')
	print(int(s[:index]) + int(s[index + 1:]))
else:
	index = s.index('-')
	print(int(s[:index]) - int(s[index + 1:]))


(a, op, b) = list(map(str, input().split()))
input_a = int(a)
input_b = int(b)
result = 0
if op == '+':
	result = input_a + input_b
elif op == '-':
	result = input_a - input_b
else:
	result = 'Error'
print(result)


l = input().split()
print(int(l[0]) + int(l[2]) if l[1] == '+' else int(l[0]) - int(l[2]))


def solve():
	print(eval(input()))
solve()


(*a,) = map(str, input().split())
print(eval(a[0] + a[1] + a[2]))


import sys
s = sys.stdin.readline()
print(eval(s))


(a, op, b) = map(str, input().split())
print((int(a) - int(b), int(a) + int(b))[op == '+'])


S = input()
ans = eval(S)
print(ans)


def main():
	s = input()
	print(eval(s))
main()


F = input().strip()
print(eval(F))


def main():
	x = input()
	print(eval(x))
main()


(A, op, B) = input().split()
print(eval('{}{}{}'.format(A, op, B)))


(A, B, C) = input().split()
A = int(A)
C = int(C)
if B == '+':
	print(A + C)
else:
	print(A - C)


(A, _, B) = input().split()
(A, B) = (int(A), int(B))
print(A + B if _ == '+' else A - B)


N = input()
print(eval(N))


l = input().split()
A = int(l[0])
B = int(l[2])
print(A + B if l[1] == '+' else A - B)


x = input()
print(eval(x))


(a, b, c) = input().split()
x = int(a)
y = int(c)
print(x + y if b == '+' else x - y)


(A, op, B) = input().split()
A = int(A)
B = int(B)
print([A + B, A - B][op == '-'])


a = input().split()
(b, c) = (int(a[0]), int(a[2]))
if a[1] == '+':
	print(b + c)
else:
	print(b - c)


def iroha():
	(a, op, b) = list(map(str, input().split()))
	a = int(a)
	b = int(b)
	if op == '+':
		result = a + b
	else:
		result = a - b
	print(result)

def __starting_point():
	iroha()
__starting_point()