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

l = []
for i in sys.stdin:
    l.append(i.split())

for i in range(0,len(l)):
    if len(l[i]) == 3:
        if l[i][1] == '+':
            result = int(l[i][0]) + int(l[i][2])
        elif l[i][1] == '-':
            result = int(l[i][0]) - int(l[i][2])
        elif l[i][1] == '*':
            result = int(l[i][0]) * int(l[i][2])
        elif l[i][1] == '/':
            result = int(l[i][0]) / int(l[i][2])
        else:
            break
        print(int(result))

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

Solution (Python):
while(True):
    n  = input()
    if '?' in n:
        break

    print(int(eval(n)))

Solution (Python):
while True:
    x=input().split(" ")
    a=int(x[0])
    op=x[1]
    b=int(x[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:
    x=input().split(" ")
    a=int(x[0])
    op=x[1]
    b=int(x[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):
a=[]
b=[]
op=[]
while(True):
    x,symbol,y = map(str,input().split())
    if symbol == "?":
        break
    else:
        a.append(int(x))
        b.append(int(y))
        op.append(symbol)
for i in range(len(a)):
    if op[i] == "+":
        print(a[i]+b[i])
    elif op[i] == "-":
        print(a[i]-b[i])
    elif op[i] == "*":
        print(a[i]*b[i])
    elif op[i] == "/":
        print(int(a[i]/b[i]))

Solution (Python):
a=[]
b=[]
op=[]
while(True):
    x,symbol,y = map(str,input().split())
    if symbol == "?":
        break
    else:
        a.append(int(x))
        b.append(int(y))
        op.append(symbol)
for i in range(len(a)):
    if op[i] == "+":
        print(a[i]+b[i])
    elif op[i] == "-":
        print(a[i]-b[i])
    elif op[i] == "*":
        print(a[i]*b[i])
    elif op[i] == "/":
        print(int(a[i]/b[i]))

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

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

Solution (Python):


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

Solution (Python):
while True:
    a, op, b = 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 True:
    I = input().split()
    op = I.pop(1)
    if op == "?":
        break
    a,b = tuple(int(n) for n in I)
    if op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)

Solution (Python):
while 1:
  a,o,b = input().split()
  if o=='?': break
  a,b = map(int,(a,b))
  print(a+b if o=='+' else a-b if o=='-' else a*b if o=='*' else a//b)

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

Solution (Python):

while True:
    list = input().split()
    a = int(list[0])
    b = int(list[2])
    op = list[1]
    if op == "?": break
    elif op == "+": print(int(a+b))
    elif op == "-": print(int(a-b))
    elif op == "*": print(int(a*b))
    elif op == "/": print(int(a/b))

Solution (Python):
while True:
	da,op,db = map(str,input().split())
	if op=='?':
		break
	a = int(da)
	b = int(db)
	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, input().split())
    a = int(a)
    c = int(c)
    if b == '?': break
    if b == '+':
        print(a + c)
    elif b == '-':
        print(a - c)
    elif b == '*':
        print(a * c)
    elif b == '/':
        print(int(a / c))

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

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

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 True:
    a, op, b = map(str, input().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)
    else:
        break

Solution (Python):
while True:
	a,op,b=input().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):



operations  = {'+': lambda a, b: a+b,
               '-': lambda a, b: a-b,
               '*': lambda a, b: a*b,
               '/': lambda a, b: int(a/b)}

while True:
    a, op, b = input().split(' ')
    if op == '?': break
    print(operations[op](int(a), int(b)))

Solution (Python):
while True:
    a = input()

    if '?' in a :
        break
    
    print(int(eval(a)))

Solution (Python):
while True :
	a,op,b = 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(int(a/b))

Solution (Python):
while True :
	a,op,b = 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(int(a/b))

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

Solution (Python):
while True:
    li = input().split()
    a = int(li[0])
    op = li[1]
    b = int(li[2])

    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:
    a,op,b = input().split()
    if op == '?': break
    elif 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))

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

Solution (Python):
while True:
    x = [i for i in input().split()]
    if x[1] == '?':
        break
    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)

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

Solution (Python):
def calcinput():
    a = input().split()
    a[0] = int(a[0])
    a[2] = int(a[2])
    return a
 
def main():
    while True:
        a = calcinput()
        if a[1] ==  "?": break
        x = a[0]; op = a[1]; y = a[2]
        if op == "+": print(x + y)
        elif op == "-": print(x - y)
        elif op == "*": print(x * y)
        elif op == "/": print(x // y)

if __name__ == "__main__":
    main()

Solution (Python):
while True:
    a, op, b = [i for i in input().split()]
    if op == "?":
        break
    elif 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))

Solution (Python):
while True:
    x = input()
    if "?" in x: break
    result = eval(x)
    print(int(result))

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

Solution (Python):
def operations():
    if op == '+':
        return a + b
    elif op == '-':
        return a - b
    elif op == '*':
        return a * b
    else:
        return a // b


while True:
    a, op, b = input().split()
    if op == '?':
        break
    a, b = int(a), int(b)
    r = operations()
    print(r)

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

Solution (Python):
while True:
    a,b,c= 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)
    elif b == "?":
        break

Solution (Python):
while(True):
    a,op,b = input().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(int(a)/int(b)))
    elif op == '?':
        break

Solution (Python):


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

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

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

Solution (Python):
while True:
    a,op,b = input().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 1:
	arr = list(map(str, input().split()))
	a = int(arr[0])
	b = int(arr[2])
	op = arr[1]
	
	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):



import sys

if __name__ == '__main__':
    line = None
    while 1:
        line = raw_input()
        a, op, b = line.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)
        elif op == '?':
        	break

Solution (Python):
while True:
 a,op,b=map(str,input().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))
 elif op=='?':
   break

Solution (Python):
while True:
    inp = input().split()
    x, y = (int(inp[0]), int(inp[2]))
    op = inp[1]
    if op == '?':
        break
    else:
        if op == '+':
            print(x + y)
        elif op == '-':
            print(x - y)
        elif op == '*':
            print(x * y)
        elif op == '/':
            print(x // y)

Solution (Python):
while True:
    a, op, b = map(str, 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)
    else:
        break

Solution (Python):
while True :
    a,op,b = 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 = input().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))
    elif op == '?':
        break

Solution (Python):
while True:
    a,b,c=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:
    k=input().split()
    k[0]=int(k[0])
    k[2]=int(k[2])
    
    if k[1]=="?":
        break
    elif k[1]=="+":
        print(k[0]+k[2])
    elif k[1]=="-":
        print(k[0]-k[2])
    elif k[1]=="*":
        print(k[0]*k[2])
    elif k[1]=="/":
        print(k[0]//k[2])

Solution (Python):


end = 0
while end == 0:
    n = [i for i in input().rstrip().split()]
    a = int(n[0])
    op = n[1]
    b = int(n[2])

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

Solution (Python):
data = []
while True:
    a, op, b = map(str, input().split())
    if op == "?":
        break
    data.append([a, op, b])

for i in range(len(data)):
    if data[i][1] == "+":
        print(int(data[i][0]) + int(data[i][2]))
    elif data[i][1] == "-":
        print(int(data[i][0]) - int(data[i][2]))
    elif data[i][1] == "*":
        print(int(data[i][0]) * int(data[i][2]))
    elif data[i][1] == "/":
        print(int(data[i][0]) // int(data[i][2]))

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

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

Solution (Python):
def main():
    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(int(a / b))
        else:
            pass

if __name__ == '__main__':
    main()

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

Solution (Python):
import math
def solve(input_text):
    for line in input_text:
        op=line[1]
        a=int(line[0])
        b=int(line[2])
        ans=0
        
        if op=='+':
            ans=a+b
        if op=='-':
            ans=a-b
        if op=='*':
            ans=a*b
        if op == '/':
            ans =math.floor(a/b)
        print(ans)
    
def answer():
    input_text=[]
    line=[]
    
    while True:
        
        line = input()
        line= line.split(' ')
        if line[1]=='?':
            break
        input_text.append(line)
    
    solve(input_text)

if __name__ =='__main__':
    answer()

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

Solution (Python):
import math

def calc(op, a, b):
    if op == '+':
        return int(a) + int(b)
    elif op == '-':
        return int(a) - int(b)
    elif op == '*':
        return int(a) * int(b)
    elif op == '/':
        return math.floor(float(a) / float(b))

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

    if op == "?":
        break

    print(calc(op, 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:
  s = raw_input()
  a, op, b = s.split()
  if op == '?': break
  print eval(s)

Solution (Python):




def main():
    while True:
        a, op, b = [x for x in raw_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
        elif op == '/':
            print a / b

if __name__ == '__main__':
    main()

Solution (Python):
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p == 0: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

Solution (Python):
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p == 0: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

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

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

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

Solution (Python):
r = 0
while r == 0:
        i = map(str,raw_input().split())
        i[0] = int(i[0])
        i[2] = int(i[2])
        if i[1] == "+":
                print i[0]+i[2]
        elif i[1] == "-":
                print i[0]-i[2]
        elif i[1] == "*":
                print i[0]*i[2]
        elif i[1] == "/":
                print i[0]/i[2]
        elif i[1] == "?":
                break
        else:
                print "error"

Solution (Python):
from __future__ import division, print_function
from sys import stdin, exit
from operator import add, sub, mul, floordiv
d = {'+': add, '-': sub, '*': mul, '/': floordiv, '?': lambda a,b: exit(0)}
while True:
    a, op, b = stdin.readline().split()
    print(d[op](int(a), int(b)))

Solution (Python):
import sys
for line in sys.stdin:
    a, op, b = line.rstrip('\n').split(' ')
    if op == '+':
        print '%d' % (int(a) + int(b))
    elif op == '-':
        print '%d' % (int(a) - int(b))
    elif op == '*':
        print '%d' % (int(a) * int(b))
    elif op == '/':
        print '%d' % (int(a) / int(b))
    elif op == '?':
        break

Solution (Python):
while True:
    (m,n,o)=map(str, raw_input().split())
    m,o=int(m),int(o)
    if n=='?': break
    elif n=='+': print m+o
    elif n=='-': print m-o
    elif n=='*': print m*o
    elif n=='/': print m/o
    else: pass

Solution (Python):
while True:
	a, op, b = raw_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
	elif (op == "/"):
		print a / b

Solution (Python):
while True:
    a,op,b = raw_input().split()
    if op == "?":
        break
    print eval(a+op+b)

Solution (Python):
while 1:
    a, op, b = raw_input().split()
    a, b = map(int, [a, 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()
    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
 if(op=="+"):
  print int(a)+int(b)
 if(op=="-"):
  print int(a)-int(b)
 if(op=="*"):
  print int(a)*int(b)
 if(op=="/"):
  print int(a)/int(b)

Solution (Python):


import sys
while 1:
  equation = raw_input().split(" ")

  a = int(equation[0])
  b = int(equation[2])
  mark = equation[1]

  if mark == "?":
      sys.exit()
  elif mark == "+":
      print str(a+b)
  elif mark == "-":
      print str(a-b)
  elif mark == "*":
      print str(a*b)
  elif mark == "/":
      print str(a/b)

Solution (Python):
while True:
    li = raw_input().split()
    if li[1] == "+":
        print int(li[0]) + int(li[2])
    elif li[1] == "-":
        print int(li[0]) - int(li[2])
    elif li[1] == "*":
        print int(li[0]) * int(li[2])
    elif li[1] == "/":
        print int(li[0]) / int(li[2])
    elif li[1] == "?":
        break

Solution (Python):
while True:
    s = input()
    a, op, b = s.split()
    if op == '?': break
    print(int(eval(s)))

Solution (Python):
while True:
 a,op,b=raw_input().split()
 if op=="?":break
 if op=="+":print int(a)+int(b)
 if op=="-":print int(a)-int(b)
 if op=="*":print int(a)*int(b)
 if op=="/":print int(a)/int(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):
while 1:
    a, op, b = input().split()
    if op == '?':
        exit()
    if op == '+':
        print(int(a)+int(b))
    if op == '-':
        print(int(a)-int(b))
    if op == '*':
        print(int(a)*int(b))
    if op == '/':
        print(int(a)//int(b))

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

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

Solution (Python):

while (1):
    x,op,y = input().split()
    x=int(x)
    y=int(y)
    if op == "+":
        print(x+y)
    elif op == "-":
        print(x-y)
    elif op == "*":
        print(x*y)
    elif op == "/":
        print(int(x/y))
    else:
        break

Solution (Python):
i = 0

while True:
    a,b,c = input().split()
    a = int(a)
    c = int(c)
    
    if b == "+":
        d = a + c
        print(d)
    elif b == "-":
        print(a - c)
    elif b == "*":
        print(a * c)
    elif b == "/":
        print(a//c)
    else:
        break

Solution (Python):

def main():

    input_array_list = []

    while True:
        input_array = input().split()
        if input_array[1] == "?":
            break
        else:
            input_array_list.append(input_array)

    for item in input_array_list:
        if item[1] == "+":
            print(str(int(item[0])+int(item[2])))
        elif item[1] =="-":
            print(str(int(item[0])-int(item[2])))
        elif item[1] == "/":
            print(str(int(item[0])//int(item[2])))
        elif item[1] == "*":
            print(str(int(item[0])*int(item[2])))

main()

Solution (Python):
while True:
    data = input().split()
    a,op,b = int(data[0]),data[1],int(data[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:
    try:
        a,o,b=input().split()
        a=int(a)
        b=int(b)
    except EOFError:
        break
    if o == "+":
        print(a+b)
    elif o == "-":
        print(a-b)
    elif o == "*":
        print(a*b)
    elif o =="/":
        print(a//b)
    else:
        break

Solution (Python):
while True:
    try:
        a,o,b=input().split()
        a=int(a)
        b=int(b)
    except EOFError:
        break
    if o == "+":
        print(a+b)
    elif o == "-":
        print(a-b)
    elif o == "*":
        print(a*b)
    elif o == "/":
        print(a//b)
    else:
        break

Solution (Python):
while True:
  a, op, b = input().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))
  elif op == "?":
    break

Solution (Python):
for i in range(100000):
    s = input().rstrip().split(" ")
    a = int(s[0])
    b = s[1]
    c = int(s[2])
    if b =="?":
        break
    if b == "+":
        print(a+c)
    if b == "-":
        print(a-c)
    if b == "*":
        print(a*c)
    if b == "/":
        print(int(a/c))

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

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

Solution (Python):
while True:
    a,op,b=input().split()
    
    a=int(a)
    b=int(b)
    
    if op=='?':
        break
    
    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 = 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):
def calc():
    answers = []
    while True:
        a, op, b = input().split()
        a = int(a)
        b = int(b)
        if op == "?":
            break
        if op == "+":
            wa = a + b
            answers.append(wa)
        elif op == "-":
            sa = a - b
            answers.append(sa)
        elif op == "*":
            seki = a * b
            answers.append(seki)
        elif op == "/":
            shou = int(a / b)
            answers.append(shou)
    for ans in answers:
        print(ans)


calc()

Solution (Python):
while True:
    a , op , b = 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):
while True:
    s = input()
    try:
        print(int(eval(s)))
    except SyntaxError:
        break;

Solution (Python):
import math
list_a=[]
list_op=[]
list_b=[]
while True:
    a,op,b=str(input()).split()
    if op!="?":
        a=int(a)
        list_a.append(a)
        list_op.append(op)
        b=int(b)
        list_b.append(b)
    else:
        break
for i in range(len(list_op)):
    A=list_a[i]
    OP=list_op[i]
    B=list_b[i]
    if OP=="+":
        x=math.floor(A+B)
    elif OP=="-":
        x=math.floor(A-B)
    elif OP=="*":
        x=math.floor(A*B)
    else:
        x=math.floor(A/B)
    print(x)

Solution (Python):
while True:
    a, op, b = 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)
    else:
        print(a // b)

Solution (Python):
while 1:
    a,op,b = input().split()
    a=int(a)
    b = int(b)
    op  = str(op)
    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 = 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):
a,b,op = [],[],[]
while True:
	inp = input().split()
	if inp[1] == "?":
		break
	else:
		a.append(int(inp[0]))
		b.append(int(inp[2]))
		op.append(inp[1])
for i in range(len(a)):
	if op[i] == "+":
		print(a[i]+b[i])
	elif op[i] == "-":
		print(a[i]-b[i])
	elif op[i] == "*":
		print(a[i]*b[i])
	elif op[i] == "/":
		print(a[i]//b[i])

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

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)
    elif op == "/":
        print(int(a/b))

Solution (Python):
while True:
    a, op, b = input().split()
    if op == '?':
        break
    elif 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))

Solution (Python):
while True:
    a,op,b=input().split()
    if op=='?': break
    elif 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) )

Solution (Python):
import math
while 1:
    calc = input()
    a = calc.split()[1]
    if a == "?":
        break
    else:
        print(math.floor(eval(calc)))