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):
dat = input().split()
a = int(dat[0])
op = dat[1]
b = int(dat[2])

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

Solution (Python):
import sys
for i in range(sys.maxsize):
    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(int(a)/int(b)))

Solution (Python):
while True:
	a, op, b = (x for x in 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):
a = 0
b = 0
op = "+"
ans = 0
while op != "?":
    z = input()
    a,op,b = [str(x) for x in z.split()]
    a = int(a)
    b = int(b)
    if op == "+":
        ans = a + b
        print (str(ans))
    elif op == "-":
        ans = a - b
        print (str(ans))
    elif op == "*":
        ans = a * b
        print (str(ans))
    elif op == "/":
        ans = a // b
        print (str(ans))

Solution (Python):
while True:
    try:
     (a,b,c)  =  map(str,input().split())
    except:
     exit
    if ( b == "?"):
        break

    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)

Solution (Python):
alist = []
oplist = []
blist = []

while(1):
    a, op, b = map(str, input().split())

    if op == "?":
        break

    a = int(a)
    b = int(b)

    alist.append(a)
    oplist.append(op)
    blist.append(b)

for a, op, b in zip(alist, oplist, blist):
    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,b,c=map(str,input().split())
    n1=int(a)
    n2=int(c)
    if b=="+":
        r=n1+n2
    elif b=="-":
        r=n1-n2
    elif b=="*":
        r=n1*n2
    elif b=="/":
        r=n1//n2
    else:
        break
    print(r)

Solution (Python):
a = input()
while not "?" in a:
    print(int(eval(a)))
    a = input()

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,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,b,c = input().split()
    if b == '?':
        break
    else:
        print(round(eval(a+b+c)-0.4))

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

Solution (Python):
while True:
    input_state = input()
    if input_state == "?":
        break
    else:
        ans = []
        (a, op, b) = map(str, input_state.split())
        if op == "+":
            ans = int(a) + int(b)
        elif op == "-":
            ans = int(a) - int(b)
        elif op == "*":
            ans = int(a) * int(b)
        elif op == "/":
            ans = int(int(a)/int(b))
        else:
            break
        print("{0}".format(int(ans)))

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(X//Y)
    else:
        break

Solution (Python):
while True:
	a,b,c = [i for i in 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 True:
    a, op, b = map(str, 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)
    elif op == "%":
        print(a % b)

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

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

Solution (Python):
while True:
        table = input().split()

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

        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):
import math

li = []
while True:
    a = input()
    if "?" in a:
        break
    li.append(a)

for i in li:
    i = eval(i)
    print(math.floor(i))

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

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

Solution (Python):


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

Solution (Python):
while True:
    x, op, y = input().split()
    a, b = int(x), int(y)
    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()
    aa = int(a)
    bb = int(b)
    if op == "?" :
        break
    if op == "+" :
        ans = aa + bb
    elif op == "-" :
        ans = aa - bb
    elif op == "*" :
        ans = aa * bb
    elif op == "/" :
        ans = aa // bb
    print(ans)

Solution (Python):
input_array = input().split()
result = []
while (len(input_array) >=3 and input_array[1] != '?'):
    op = input_array[1]
    a = int(input_array[0])
    b = int(input_array[2])
    if (op == '+'):
        result.append(a + b) 
    elif (op == '-'):
        result.append(a - b) 
    elif (op == '*'):
        result.append(a * b)
    else:
        result.append(a // b) 
    input_array = input().split()

for i in result:
    print(i)

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

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

    if op == '?':
        break

    if op == '+':
        print("%d"%(a+b))
    elif op == '-':
        print("%d"%(a-b))
    elif op == '/':
        print("%d"%(a/b))
    else:
        print("%d"%(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)
    elif op == "?":
        break

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

Solution (Python):

while 1:
    nn,s,mm=map(str,input().split())
    n=int(nn)
    m=int(mm)
    if s=='+':
        print(n+m)
    elif s=='-':
        print(n-m)
    elif s=='*':
        print(n*m)
    elif s=="/":
        print(n//m)
    else:
        break

Solution (Python):
L = []
while True:
    a, b, c = map(str, input().split(" "))
    k = [a, b, c]
    if b == "?":
        break


    L.append(k)

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

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

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

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

Solution (Python):
import math
results = []
while True:
    inputs = input().split()
    a = int(inputs[0])
    ope = inputs[1]
    b = int(inputs[2])
    result = None
    if ope == '?':
        break
    elif ope == '+':
        result = a + b
    elif ope == '-':
        result = a - b
    elif ope == '*':
        result = a * b
    elif ope == '/':
        result = math.floor(a / b)
    results.append(result)

for result in results:
    print(result)

Solution (Python):
while 1:
 try:print eval(raw_input())
 except:exit()

Solution (Python):
import sys
input_lines = sys.stdin.readlines()
for input_ in input_lines:
    input_ = input_.split()
    a, op, b = int(input_[0]), input_[1], int(input_[2])
    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))
    elif op =='?':
        break

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

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

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

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

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()
    if b == "?":
        break
    elif b == "+":
        print(int(a)+int(c))
    elif b == "-":
        print(int(a)-int(c))
    elif b == "*":
        print(int(a)*int(c))
    elif b == "/":
        print(int(int(a)/int(c)))

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

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):
sss = input().split(' ')
while not sss[1] == '?':
	a = int(sss[0])
	b = int(sss[2])
	op = sss[1]
	if op == '+': ans = a + b
	elif op == '-': ans = a - b
	elif op == '*': ans = a * b
	elif op == '/': ans = a // b
	print('{0}'.format(ans))
	sss = input().split(' ')

Solution (Python):


import math

def main():

	while True:
		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)
		else:
			break

if __name__ == "__main__":

	main()

Solution (Python):
data = []
output = []
for x in range(0,10000):
    data = input().split()
    if data[1] == '?':
        break
    elif data[1] == '+' :
        output.append(int(data[0]) + int(data[2]))
    elif data[1] == '-' :
        output.append(int(data[0]) - int(data[2]))
    elif data[1] == '*' :
        output.append(int(data[0]) * int(data[2]))
    else:
        output.append(int(data[0]) // int(data[2]))
    data.clear()
for x in range(0,len(output)):
    print(output[x])