Problem:
Simple Calculator Write a program which reads two integers a , b and an operator op , and then prints the value of a  op  b . The operator op is '+', '-', '*' or '/' (sum, difference, product or quotient). The division should truncate any fractional part. Input The input consists of multiple datasets. Each dataset is given in the following format.  a  op  b  The input ends with a dataset where op = '?'. Your program should not process for this dataset. Output For each dataset, print the value in a line. Constraints  0 ≤ a , b ≤ 20000  No divisions by zero are given.  Sample Input 1 1 + 2
56 - 18
13 * 2
100 / 10
27 + 81
0 ? 0 Sample Output 1 3
38
26
10
108

Solution (Python):
import sys

for line in sys.stdin:

    a_str, op, b_str = line.split()

    if op == '?': break
    
    a, b = int(a_str), int(b_str)

    if op == '+':
        print a + b
    elif op == '-':
        print a - b
    elif op == '*':
        print a * b
    elif op == '/':
        print a / b

Solution (Python):
while True:
    a,op,b = raw_input().split()
    aa = int(a)
    bb = int(b)
    if op == '?':
        break
    elif op == '+':
        print aa + bb
    elif op == '-':
        print aa - bb
    elif op == '*':
        print aa * bb
    elif op == '/':
        print aa / bb

Solution (Python):
import sys, operator

list = {'+':operator.add, '-':operator.sub, '*':operator.mul, '/':operator.truediv}

for line in sys.stdin:
    a, op, b = line.split()
    if op == '?': break
    print(int(list[op](int(a), int(b))))

Solution (Python):
while 1:
 try:print input()
 except:break

Solution (Python):
while 1:
	a, op, b = map(str, raw_input().split())
	a = int(a)
	b = int(b)
	if op == "+":
		print a + b
	elif op == "-":
		print a - b
	elif op == "*":
		print a * b
	elif op == "/":
		print a / b
	else:
		break

Solution (Python):
while True:
    _exp = raw_input()
    if "?" in _exp:
        break
    print(eval(_exp))

Solution (Python):
while True:
    i = input().split()
    result = 0
    if i[1] == '+':
        result = int(i[0]) + int(i[2])
    elif i[1] == '-':
        result = int(i[0]) - int(i[2])
    elif i[1] == '*':
        result = int(i[0]) * int(i[2])
    elif i[1] == '/':
        result = int(i[0]) // int(i[2])
    elif i[1] == '?':
        break

    print(result)

Solution (Python):
result = []
while True:
    i = input().split()
    if i[1] == '+':
        result = result +[int(i[0]) + int(i[2])]
    elif i[1] == '-':
        result = result + [int(i[0]) - int(i[2])]
    elif i[1] == '/':
        result = result + [int(int(i[0]) / int(i[2]))]
    elif i[1] == '*':
        result = result + [int(i[0]) * int(i[2])]
    elif i[1] == '?':
        break
for i in result:
    print(i)

Solution (Python):
while True:
 result = 0
 i = input().split()
 if i[1] == '+':
  result = int(i[0]) + int(i[2])
 elif i[1] == '-':
  result = int(i[0]) - int(i[2])
 elif i[1] == '*':
  result = int(i[0]) * int(i[2])
 elif i[1] == '/':
  result = int(i[0]) // int(i[2])
 elif i[1] == '?':
  break
 print(result)

Solution (Python):
while(1):
    n = map(None, raw_input().split())    
    a = int(n[0])
    op = n[1]
    b = int(n[2])
    
    if(op == '?'):
        break
    
    if(op == '+'):
        print a + b
    elif(op == '-'):
        print a - b
    elif(op == '*'):
        print a * b
    else:
        print a / b

Solution (Python):
while True:
    a,op,b = raw_input().split()
    a,b = map(int,(a,b))
    if op == "?":
        break
    if op == "+":
        print a + b
    elif op=="-":
        print a-b
    elif op=="*":
        print a*b
    elif op=="/":
        print a/b

Solution (Python):
a_list = []
b_list = []
op_list = []
count = 0
while True:
  a, op, b = (str(i) for i in input().split())
  if op != '?':
    a_list.append(int(a))
    b_list.append(int(b))
    op_list.append(op)
    count += 1
  else :
    break
for i in range(0,count):
  if op_list[i] == '+':
    print(a_list[i] + b_list[i])
  elif op_list[i] == '-':
    print(a_list[i] - b_list[i])
  elif op_list[i] == '*':
    print(a_list[i] * b_list[i])
  elif op_list[i] == '/':
    print(a_list[i] // b_list[i])

Solution (Python):
while True:
    (a, op, b) = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
from sys import stdin
 
while True:
    (a, op, b) = stdin.readline().split(' ')
    a = int(a)
    b = int(b)
    if op == "?":
        break;
    elif op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)

Solution (Python):
import sys
for line in sys.stdin:
    if line.find("?") != -1:
        break
    print(int(eval(line)))

Solution (Python):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
while 1:
	a, op, b = map(str, raw_input().split())
	a = int(a)
	b = int(b)
	if op == "+":
		print a+b
	if op == "-":
		print a-b
	if op == "*":
		print a*b
	if op == "/":
		print a/b
	if op == "?":
		break

Solution (Python):
def solve(a, op, b):
    if op == '+':
        return a + b
    elif op == '-':
        return a - b
    elif op == '*':
        return a * b
    elif op == '/':
        return a // b
    return None

if __name__ == '__main__':
    while True:
        a, op, b = input().split()
        if op == '?': break
        print(solve(int(a), op, int(b)))

Solution (Python):



while True:
    a, op, b = input().split()
    a, b = int(a), int(b)

    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    else:
        print(a // b)

Solution (Python):


while True:
    data = input().split()
    if data[1] == '?':
        break
    elif data[1] == '+':
        print(int(data[0]) + int(data[2]))
    elif data[1] == '-':
        print(int(data[0]) - int(data[2]))
    elif data[1] == '*':
       print(int(data[0]) * int(data[2]))
    elif data[1] == '/':
       print(int(data[0]) // int(data[2]))

Solution (Python):


while True:
    data = input().split()
    if data[1] == '?':
        break
    elif data[1] == '+':
        print(int(data[0]) + int(data[2]))
    elif data[1] == '-':
        print(int(data[0]) - int(data[2]))
    elif data[1] == '*':
        print(int(data[0]) * int(data[2]))
    elif data[1] == '/':
        print(int(data[0]) // int(data[2]))

Solution (Python):


while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):


while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
while 1:
 try:print input()
 except:break

Solution (Python):
import sys

while True:
	a, op, b = sys.stdin.readline().split( " " )
	if "?" == op:
		break
	a = int( a )
	b = int( b )
	if "+" == op:
		print( "{:d}".format( a+b ) )
	elif "-" == op:
		print( "{:d}".format( a-b ) )
	elif "*" == op:
		print( "{:d}".format( a*b ) )
	elif "/" == op:
		print( "{:d}".format( a//b ) )

Solution (Python):
import sys

while True:
	a, op, b = sys.stdin.readline().split( " " )
	if "?" == op:
		break
	a = int( a )
	b = int( b )
	if "+" == op:
		print( "{:d}".format( a+b ) )
	elif "-" == op:
		print( "{:d}".format( a-b ) )
	elif "*" == op:
		print( "{:d}".format( a*b ) )
	elif "/" == op:
		print( "{:d}".format( a//b ) )

Solution (Python):
import sys

while True:
	a, op, b = sys.stdin.readline().split( " " )
	if "?" == op:
		break
	a, b = int( a ), int( b )
	if "+" == op:
		print( "{:d}".format( a+b ) )
	elif "-" == op:
		print( "{:d}".format( a-b ) )
	elif "*" == op:
		print( "{:d}".format( a*b ) )
	elif "/" == op:
		print( "{:d}".format( a//b ) )

Solution (Python):
while True:
	a,b,c=map(str, input().split())
	if b=='?':
		break
	a=int(a)
	c=int(c)
	if b=='+':
		print(a+c)
	elif b=='*':
		print(a*c)
	elif b=='/':
		print(int(a/c))
	elif b=='-':
		print(a-c)

Solution (Python):
while 1:
	a, op, b = map(str, raw_input().split())
	a = int(a)
	b = int(b)
	if op == '?':
		break
	elif op == '+':
		print (a + b)
	elif op == '-':
		print (a - b)
	elif op == '*':
		print (a * b)
	elif op == '/':
		print (a / b)

Solution (Python):
while True:
	a,op,b=input().split(" ")
	a,b=[int(i) for i in (a,b)]
	if op=="?":
		break
	print(a+b if op=="+" else a-b if op=="-" else a*b if op=="*" else int(a/b) if op=="/" else "")

Solution (Python):
while True:
	a,op,b=input().split(" ")
	a,b=[int(i) for i in (a,b)]
	if op=="+":
		print(a+b)
	elif op=="-":
		print(a-b)
	elif op=="*":
		print(a*b)
	elif op=="/":
		print(int(a/b))
	else:
		break

Solution (Python):
while 1:
	a, op, b = map(str, raw_input().split())
	a = int(a)
	b = int(b)
	if op == '?':
		break
	elif op == '+':
		print (a + b)
	elif op == '-':
		print (a - b)
	elif op == '*':
		print (a * b)
	elif op == '/':
		print (a / b)

Solution (Python):
while True:
    a, op, b = raw_input().split()
    if op == '?': break
    a, b = int(a), int(b)
    if op == '+': print a+b
    if op == '-': print a-b
    if op == '*': print a*b
    if op == '/': print a/b

Solution (Python):


while True:
    a,op,b = map(str,raw_input().split())
    a = int(a)
    b = int(b)
    if op == '+':
        print a + b
    elif op == '-':
        print a - b
    elif op == '*':
        print a * b
    elif op == '/':
        print a / b
    else:
        break

Solution (Python):
while True:
    a, op, b = map(str, input().split())
    if op == "?":
        break
    if op == "/":
        op = "//"
    formula = a + op + b
    print(eval(formula))

Solution (Python):
while True:
    s = input()
    if '?' in s:
        break
    print(int(eval(s)))

Solution (Python):
def main():
    flag = True
    while flag:
        s1, tr, s2 = input().split()
        s1, s2 = int(s1), int(s2)
        if tr == "+":
            print(s1 + s2)
        elif tr == "-":
            print(s1 - s2)
        elif tr == "*":
            print(s1 * s2)
        elif tr == "/":
            print(s1 // s2)
        else:
            flag = False
            break


if __name__=="__main__":
    main()

Solution (Python):

while True:
    a, op, b = raw_input().rstrip().split()
    if op == '+':
        print int(a) + int(b)
    elif op == '-':
        print int(a) - int(b)
    elif op == '*':
        print int(a) * int(b)
    elif op == '/':
        print int(a) / int(b)
    else:
        break

Solution (Python):
if __name__ == "__main__":

    while True:
        s = raw_input().split()
        a = int(s[0])
        b = int(s[2])
        op = s[1];

        if op == "*":
            x = a * b
        elif op == "+":
            x = a + b
        elif op == "-":
            x = a - b
        elif op == "/":
            x = a / b
        elif op == "?":
            break;
        print x

Solution (Python):
def cal(a, op, b):

  if op == '+':
    r = a + b
  elif op == '-':
    r = a - b
  elif op == '*':
    r = a * b
  else:
    r = a / b
  return r

while 1:
  a,op,b = raw_input().split()
  if op == '?':
    break
  else:
    print(cal(int(a), op, int(b)))

Solution (Python):
def cal(a, op, b):

  if op == '+':
    r = a + b
  elif op == '-':
    r = a - b
  elif op == '*':
    r = a * b
  elif op == '/':
    r = a / b
  return r

while 1:
  a,op,b = raw_input().split()
  if op == '?':
    break
  else:
    print(cal(int(a), op, int(b)))

Solution (Python):
def cal(a, op, b):

  if op == '+':
    r = a + b
  elif op == '-':
    r = a - b
  elif op == '*':
    r = a * b
  elif op == '/':
    r = a / b
  return r

while 1:
  a,op,b = raw_input().split()
  if op == '?':
    break
  else:
    print(cal(int(a), op, int(b)))

Solution (Python):
while 1:
    t = input()
    if '?' in t:
        break
    print(int(eval(t)))

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]

    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
def calc(a, op, b):
    if op == "+":
        r = a + b
    elif op == "-":
        r = a - b
    elif op == "*":
        r = a * b
    else:
        r = a / b
    return r
 
while True:
    a, op , b = raw_input().split()
    if op == "?":
        break
    print(calc(int(a), op, int(b)))

Solution (Python):
while True:
    (a, op, b) = input().split()
    a = int(a)
    b = int(b)
    if op == '?':
        break
    elif op == '+':
        print(a + b)
        pass
    elif op == '-':
        print(a - b)
        pass
    elif op == '*':
        print(a * b)
        pass
    else:
        print(a // b)

Solution (Python):
def solve(a, op, b):
    if op == '+':
        return a + b
    elif op == '-':
        return a - b
    elif op == '*':
        return a * b
    elif op == '/':
        return a // b
    return None
 
if __name__ == '__main__':
    while True:
        a, op, b = input().split()
        if op == '?': break
        print(solve(int(a), op, int(b)))

Solution (Python):
result = []
while True:
    i = input().split()
    if i[1] == '+':
        result = result +[int(i[0]) + int(i[2])]
    elif i[1] == '-':
        result = result + [int(i[0]) - int(i[2])]
    elif i[1] == '/':
        result = result + [int(int(i[0]) / int(i[2]))]
    elif i[1] == '*':
        result = result + [int(i[0]) * int(i[2])]
    elif i[1] == '?':
        break
for i in result:
    print(i)

Solution (Python):
while True :
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]

    if op == '?' :
        break
    elif op == '+' :
        print(a + b)
    elif op == '-' :
        print(a - b)
    elif op == '*' :
        print(a * b)
    elif op == '/' :
        print(a // b)

Solution (Python):
while True:
    ( a, op, b) = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break
    elif op == '+':
        print( '{0}'.format( a + b))
    elif op == '-':
        print( '{0}'.format( a - b))
    elif op == '*':
        print( '{0}'.format( a * b))
    elif op == '/':
        print( '{0}'.format( a // b))

Solution (Python):
def calc(a,op,b):
    if op == "+":
        r = a + b 
    if op == "-":
        r = a - b 
    if op == "*":
        r = a * b 
    if op == "/":
        r = a // b
    return r

if __name__ == '__main__':
    while True:
        a,op,b = input().split()
        if op == "?":
            break
        print(calc(int(a),op,int(b)))

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
def calc(a,op,b):
    if op == "+":
        r = a + b 
    if op == "-":
        r = a - b 
    if op == "*":
        r = a * b 
    if op == "/":
        r = a // b
    return r
 
if __name__ == '__main__':
    while True:
        a,op,b = input().split()
        if op == "?":
            break
        print(calc(int(a),op,int(b)))

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        i = a * b
        print(a * b)

    if op == '/':
        print(a // b)

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]

    if op == '?':
        break
    elif op =='+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a//b)
    else :
        break

Solution (Python):
import warnings


data = 1

i = 0

while (i == 0):
    temp = raw_input().split()

    if (temp[1] == '+'):
        data = int(temp[0]) + int(temp[2])
        print data
    elif (temp[1] == '-'):
        data = int(temp[0]) - int(temp[2])
        print data
    elif (temp[1] == '*'):
        data = int(temp[0]) * int(temp[2])
        print data
    elif (temp[1] == '/'):
        data = int(temp[0]) / int(temp[2])
        print data
    else:
        break

Solution (Python):
while True:
    (a, op, b) = input().split()
    a = int(a)
    b = int(b)
    if op == '?':
        break
    elif op == '+':
        print(a + b)
        pass
    elif op == '-':
        print(a - b)
        pass
    elif op == '*':
        print(a * b)
        pass
    else:
        print(a // b)

Solution (Python):
ans = []
while True:
  arr = map(str, raw_input().split())
  if arr[1] is '?':
    break

  val = eval(arr[0] + arr[1] + arr[2])
  ans.append(val)

print("\n".join(map(str, ans)))

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]

    if op == '?':
        break
    elif op =='+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a//b)
    else :
        break

Solution (Python):
op = ""

while op != "?":
  input = raw_input().split(" ")

  a = int(input[0])
  op = input[1]
  b = int(input[2])

  result = 0
  if op == "+":
    result = a + b
  elif op == "-":
    result = a - b
  elif op == "*":
    result = a * b
  elif op == "/":
    result = a / b
  else:
    break

  print "%d" % result

Solution (Python):
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
    if op == '?':
        break
    elif op =='+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
while 1:
    t = input()
    if '?' in t:
        break
    print(int(eval(t)))

Solution (Python):
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
while True:
    a = input()
    if '?' in a:
        break
    print(eval(a.replace("/", "//")))

Solution (Python):
while True:
    a = input()
    if '?' in a:
        break
    print("%d" % eval(a))

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
 
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)

Solution (Python):
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
while True :
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
 
    if op == '?' :
        break
    elif op == '+' :
        print(a + b)
    elif op == '-' :
        print(a - b)
    elif op == '*' :
        print(a * b)
    elif op == '/' :
        print(a // b)

Solution (Python):
from itertools import takewhile
(lambda *_: None)(*map(print,
                       map(eval,
                           map(lambda s: s.replace('/', '//'),
                               takewhile(lambda s: '?' not in s,
                                         iter(input, ''))))))

Solution (Python):
while True:
	a,op,b=raw_input().split()
	a,b=int(a),int(b)
	if op=='?': break
	if op=='+': print a+b
	elif op=='-': print a-b
	elif op=='*': print a*b
	elif op=='/': print a/b

Solution (Python):
while True:
    a, op, b = raw_input().split()
    if op == "?":
        break
    else:
        if op == '+':
            print int(a) + int(b)
        elif op == '-':
            print int(a) - int(b)
        elif op == '*':
            print int(a) * int(b)
        elif op == '/':
            print int(a) / int(b)
        else:
            print "error"

Solution (Python):
import sys

for x in sys.stdin:
    if "?" in x:
        break
    print(eval(x.replace("/", "//")))

Solution (Python):
a = []
while True:
    b = raw_input().split()
    if b[1] == '?':
        break
    c = [int(b[0]), b[1], int(b[2])]
    a.append(c)
for list in a:
    x, op, y = list
    if op == '+':
        print x + y
    elif op == '-':
        print x - y
    elif op == '*':
        print x * y
    else:
        print x / y

Solution (Python):
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
while True:
    s = raw_input().split()
    a = int(s[0])
    op = s[1]
    b = int(s[2])
    if op == '+':
        print a+b
    elif op == '-':
        print a-b
    elif op == '*':
        print a*b
    elif op == '/':
        print a/b
    elif op == '?':
        break

Solution (Python):
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Solution (Python):
def add(x,y):
    return x + y
def sub(x,y):
    return x - y
def mul(x,y):
    return x * y
def mod(x,y):
    return x / y



x = []
a = []
while True:
    x = raw_input().split()
    if x[1]=='?':
        break
    if x[1]=='+':
        y = add(int(x[0]),int(x[2]))
    if x[1]=='-':
        y = sub(int(x[0]),int(x[2]))
    if x[1]=='*':
        y = mul(int(x[0]),int(x[2]))
    if x[1]=='/':
        y = mod(int(x[0]),int(x[2]))
    a.append(y)

    
for j in range(len(a)):
    print a[j]

Solution (Python):
while True :
	x = raw_input().split()
	a = int(x[0])
	b = int(x[2])

	if x[1] == '+' :
		print a + b
	elif x[1] == '-' :
		print a - b
	elif x[1] == '*' :
		print  a * b 
	elif x[1] == '/' :
		print a / b
	elif x[1] == '?' :
		break

Solution (Python):
while True :
	char_line = raw_input().split()
	a = int(char_line[0])
	b = int(char_line[2])
	if char_line[1] == '?':
		break
	elif char_line[1] =='+':
		print(a+b)
	elif char_line[1]=='-':
		print(a-b)
	elif char_line[1]=='*':
		print(a*b)
	else:
		print(a/b)

Solution (Python):
while True:
    a, op, b = raw_input().split()
    a, b = map(int,[a,b])
    if op == "?":
        break
    if op=="+":
        print (a+b)
    elif op=="-":
        print (a-b)
    elif op=="*":
        print (a*b)
    elif op=="/":
        print (a/b)

Solution (Python):


while True:
	a, op, b = raw_input().split()
	if op == "?":
		break
	a, b = map(int, (a,b))
	if op == "+":
		print(a+b)
	elif op == "-":
		print(a-b)
	elif op == "*":
		print(a*b)
	else:
		print(a/b)

Solution (Python):
while True:
	a,b,c = map(str,raw_input().split())
	a=int(a)
	c=int(c)
	if b=="+":
		print a+c
	elif b=="-":
		print a-c
	elif b=="*":
	    print a*c
	elif b=="/":
		print a/c
	else:
		break

Solution (Python):
while 1:
  l=raw_input()
  if l.find("?")==-1:
    print eval(l)
  else: 
    break

Solution (Python):
while True:

	a, op, b = [int(i) if i.isdigit() else i for i in input().split()]

	if op == "+":
		print(a + b)

	elif op == "-":
			print(a - b)

	elif op == "*":
		print(a * b)

	elif op == "/":
		print(int(a / b))

	elif op == "?":
		break;

Solution (Python):
l = []
while True:
  a,op,b = input().split()
  if op == '?':
    break
  A = int(a)
  B = int(b)
  if op == '+':
    l.append(A+B)
  elif op == '-':
    l.append(A-B)
  elif op == '*':
    l.append(A*B)
  elif op == '/':
    l.append(A//B)
for i in l:
  print(i)

Solution (Python):
while True :
    a, op, b = map(str, raw_input().split(" "))
    a = int(a)
    b = int(b)
    if (op == "?") :
        break
    elif (op == "+") :
        print("%d" % (a+b))
    elif (op == "-") :
        print("%d" % (a-b))
    elif (op == "*") :
        print("%d" % (a*b))
    elif (op == "/") :
        print("%d" % (a/b))

Solution (Python):
buf = []
while True:
    in_line = raw_input().split()
    if in_line[1] == "?":
        break
    else:
        a = int(in_line[0])
        b = int(in_line[2])
        op = in_line[1]
        if op == "+":
            buf.append(a+b)
        elif op == "-":
            buf.append(a-b)
        elif op == "*":
            buf.append(a*b)
        elif op == "/":
            buf.append(a/b)
for i in buf:
    print i

Solution (Python):


while True:
 a,op,b = input().split()
 a,b = map(int,[a,b])
 if op == '+':
  print(a+b)
 elif op == '-':
  print(a-b)
 elif op == '*':
  print(a*b)
 elif op == '/':
  print(a//b)
 elif op == '?':
  break

Solution (Python):
import re
while True:
    s = input()
    if (re.match(r'.+\s\?\s.+', s)):
        break
    print(int(eval(s)))

Solution (Python):
import sys

for v in iter(sys.stdin.readline,""):
    a,op,b = v.split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a/b)
    elif op == '?':
        break

Solution (Python):



import sys

io = sys.stdin

op = { "+" : lambda x, y:  x + y,
        "-": lambda x,y: x - y,
        "/": lambda x,y: x/y,
        "*": lambda x,y: x*y }


while True:
    a, op_, b = io.readline().split()
    if op_ == "?" : break
    a1, b1 = int(a), int(b)

    print op[op_](a1, b1)

Solution (Python):
while True:
    a,op,b=input().split()
    if op=="?":
        break
    a=int(a)
    b=int(b)
    if op=="+":
        print(a+b)
    if op=="-":
        print(a-b)
    if op=="*":
        print(a*b)
    if op=="/":
        print(a//b)

Solution (Python):
import sys

for stdin in sys.stdin:
    inlist = stdin.split()

    a = int(inlist[0])
    b = int(inlist[2])
    op = inlist[1]
    
    if op == "?":
        break
    elif op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "/":
        print(a // b)
    elif op == "*":
        print(a * b)

Solution (Python):
while True:
	t = input().split()
	a = int(t[0])
	b = t[1]
	c = int(t[2])
	d = 0
	if (b == "?"):
		break
	if (b == "+"):
		d = a + c
	if (b == "-"):
		d = a - c
	if (b == "*"):
		d = a * c
	if (b == "/"):
		d = int(a / c)
	print(str(d))

Solution (Python):


import math

op = "init"
ans = []

while (op != "?"):
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if (op == '+'):
        ans.append(a + b)
    elif (op == '-'):
        ans.append(a - b)
    elif (op == '*'):
        ans.append(a * b)
    elif (op == "/"):
        ans.append(int(a / b))

for answer in ans:
    print(answer)

Solution (Python):
while 1:
    a, op, b = raw_input().split(' ')
    if op == '?':break
    print eval("%s %s %s"%(a, op, b))

Solution (Python):

n = 0
while n != 1:
 m = raw_input().split()
 if m[1] == "?":
     break

 if m[1] == "+":
     print int(m[0])+int(m[2])
 if m[1] == "-":
     print int(m[0])-int(m[2])
 if m[1] == "*":
     print int(m[0])*int(m[2])
 if m[1] == "/":
     print int(m[0])/int(m[2])

Solution (Python):
while True:
    line = raw_input().split()
    a = int(line[0])
    op = str(line[1])
    b = int(line[2])
    if op == '+':
        print a + b
    elif op == '-':
        print a - b
    elif op == '*':
        print a * b
    elif op == '/':
        print int(a / b)
    elif op == '?':
        break

Solution (Python):
while 1:
  a,op,b=raw_input().split()
  a, b=int(a), int(b)
  if op == "+":
    print a+b
  elif op == "-":
    print a-b
  elif op == "*":
    print a*b
  elif op == "/":
    print a/b
  elif op == "?":
    break

Solution (Python):
while 1 > 0:
    formula = raw_input()
    a, op, b = formula.split()
    if op == "?":
        break
    a = int(a)
    b = int(b)
    if op == "+":
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b

Solution (Python):
while True:
 x = raw_input().split()
 a = int(x[0])
 b = int(x[2])
 op = x[1]
 if op == '+' :
  print a + b
 elif op == '-' :
  print a - b
 elif op == '*' :
  print  a * b 
 elif op == '/' :
  print a / b
 elif op == '?' :
  break

Solution (Python):
while True:
 a,op,b = map(str,raw_input().split())
 a=int(a)
 b=int(b)

 if(op=='?'):
  break
 if(op=='+'):
  print a+b
 elif(op=='-'):
  print a-b
 elif(op=='*'):
  print a*b
 elif(op=='/'):
  print a/b

Solution (Python):
while True:
    Input = raw_input().split()

    a  = int(Input[0])
    op = Input[1]
    b  = int(Input[2])

    if   op == "+":
        ans = a + b
        print ans
    elif op == "-":
        ans = a - b
        print ans
    elif op == "/":
        ans = a / b
        print ans
    elif op == "*":
        ans = a * b
        print ans
    elif op == "?":
        break

Solution (Python):
while(1):
  a,op,b = raw_input().split()
  a = int(a)
  b = int(b)
  if op == "+":
    print (a+b)
  elif op == "-":
    print (a-b)
  elif op == "*":
    print (a*b)
  elif op == "/":
    print (a/b)
  elif op == "?":
    break

Solution (Python):
while 1:
  s = raw_input().split()
  a, b =int(s[0]), int(s[2])
  op = s[1] 

  if op == "+":
    print "%d" %(a + b)
  elif op == "-":
    print "%d" %(a - b)
  elif op == "*":
    print "%d" %(a * b)
  elif op == "/":
    print "%d" %(a / b)
  else:
    break

Solution (Python):
while True:
  s = raw_input().split()
  a = int(s[0])
  op = s[1]
  b = int(s[2])
  if op == '?':
    break
  elif op == '+':
    print (a+b)
  elif op == '-':
    print (a-b)
  elif op == '*':
    print (a*b)
  elif op == '/':
    print (a/b)

Solution (Python):
ans = []

while True:
  cin = raw_input().split()
  a = int(cin[0])
  b = int(cin[2])
  if cin[1] == "+":
    ans.append(a + b)
  elif cin[1] == "-":
    ans.append(a - b)
  elif cin[1] == "*":
    ans.append(a * b)
  elif cin[1] == "/":
    ans.append(a // b)
  elif cin[1] == "?":
    break

for i in range(len(ans)):
  print(ans[i])

Solution (Python):
while 1:
   a, op, b = raw_input().split()
   A = int(a)
   B = int(b)
 
   if op == '?':
      break
   elif op == '+':
      print A+B
   elif op == '-':
      print A-B
   elif op == '*':
      print A*B
   elif op == '/':
      print A/B

Solution (Python):
while 1 :
    a, op, b= raw_input().split()
    c = int(a)
    d = int(b)
    if op == '?': break
    elif op == '+': print c + d
    elif op == '-': print c - d
    elif op == '*': print c * d
    elif op == '/': print c / d