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



Sample input:
1 + 2
56 - 18
13 * 2
100 / 10
27 + 81
0 ? 0


Sample output:
3
38
26
10
108

Submission status: Accepted

Solution code:
import math
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(int(a / b))
    elif (op == '?'):break

Submission status: Accepted

Solution code:
a = 1
b = 1
op = ''
i = 0
while op!='?':
	a,op,b = [i for i in input().split()]
	a = int(a)
	b = int(b)
	if op!='?':
		if op=='+':
			print(a+b)
		elif op=='-':
			print(a-b)
		elif op=='*':
			print(a*b)
		elif op=='/':
			print(a//b)

Submission status: Accepted

Solution code:
while True:
    A, B, C = map(str, input().split())
    a = int(A)
    b = int(C)
    if B=="?":
        break
    elif B=="+":
        print(a+b)
    elif B==("-"):
        print(a-b)
    elif B=="*":
        print(a*b)
    elif B==("/"):
        print(a//b)

Submission status: Accepted

Solution code:
while(1):
    a, op, b = 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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
for i in sys.stdin.readlines():
    line = i.split()
    a = int(line[0])
    op = line[1]
    b = int(line[2])
    if op == "?":
        break
    elif op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !

def func():
    result=""
    while(True):
        try:
            line = input().rstrip()
            elements = line.split(" ")
            elements[0] = int(elements[0])
            elements[2] = int(elements[2])
        except:
            print("input error")
            return -1
        
        operator=elements[1]
        if(operator == "+"):
            print(elements[0]+elements[2])
#            result+=str(elements[0]+elements[2])+"\n"
        elif(operator == "-"):
            print(elements[0]-elements[2])
#            result+=str(elements[0]-elements[2])+"\n"
        elif(operator == "*"):
            print(elements[0]*elements[2])
#            result+=str(elements[0]*elements[2])+"\n"
        elif(operator == "/"):
            print(elements[0]//elements[2])
#            result+=str(elements[0]//elements[2])+"\n"
        elif(operator == "?"):
#            result.rstrip()
            break
        else:
            print("input error")
            return -1
        
#    print(result)

func()

Submission status: Accepted

Solution code:
while(True):
    hoge = input().split()
    a = int(hoge[0])
    b = int(hoge[2])
    op = hoge[1]
    if(op == '+'):
        ans = a + b
    elif(op == '-'):
        ans = a - b
    elif(op == '*'):
        ans = a * b
    elif(op == '/'):
        ans = int(a / b)
    else:
        exit()
    print(ans)

Submission status: Accepted

Solution code:
while True:
    calc = input()
    if "?" in calc:
        break
    print(eval(calc.replace("/","//")))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
opArray = []
answers = []

a, op, b = input().split()

while op != '?':
    opArray.append([a, op, b])
    a, op, b = input().split()

for i in range(len(opArray)):
    if opArray[i][1] == "+":
        answers.append(int(opArray[i][0]) + int(opArray[i][2]))
    elif opArray[i][1] == "-":
        answers.append(int(opArray[i][0]) - int(opArray[i][2]))
    elif opArray[i][1] == "/":
        answers.append(int(int(opArray[i][0]) / int(opArray[i][2])))
    elif opArray[i][1] == "*":
        answers.append(int(opArray[i][0]) * int(opArray[i][2]))
    else:
        break

for i in answers:
    print(i)

Submission status: Accepted

Solution code:
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) )

Submission status: Accepted

Solution code:
#coding:UTF-8

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

Submission status: Accepted

Solution code:
s = input()
while "?" not in s:
    s.replace("/","//")
    print(int(eval(s)))
    s = input()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*
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)
    else:
        print(a // b)

Submission status: Accepted

Solution code:
from sys import stdin

def calc(a, op, b):
    if op == '+':
        return a+b

    if op == '-':
        return a-b

    if op == '*':
        return a*b

    if op == '/':
        return int(a/b)


for line in stdin:
    a, op, b = line.rstrip().split(' ')

    if op == '?':
        break

    print(calc(int(a), op, int(b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, op, b = input().split()
a = int(a)
b = int(b)
L = []
while op != "?":
 L.append([a, b, op])
 a, op, b = input().split()
 a = int(a)
 b = int(b)

for (a, b, op) in L:
 if op == "+":
  print(str(a + b))
 elif op == "-":
  print(str(a - b))
 elif op == "*":
  print(str(a * b))
 else:
  print(str(a // b))

Submission status: Accepted

Solution code:
val=0
while 1:
    try:
        a,op,b = input().split()
        a=int(a)
        b=int(b)
        if op=='?': 
            break
        elif op=='+':
            val=a+b
        elif op=='-':
            val=a-b
        elif op=='*':
            val=a*b
        elif op=='/':
            val=a//b
        print(val)
    except EOFError:
        #print("EOFError")
        break

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
while True:
    a, op, b = 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

Submission status: Accepted

Solution code:
while 1:
    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))

Submission status: Accepted

Solution code:
# coding: utf-8
while 1:
    a, op, b = input().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(a) // int(b)
    else:
        break
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
op =""

while op != "?":
    a, op, b=input().rstrip().split(" ")
    a = int(a)
    b = int(b)
    if op =="?":
        break
    if op == "+":
        ans = a + b
    elif op =="-":
        ans = a - b
    elif op =="*":
        ans = a*b
    else:
        ans =int(a/b)
    print(ans)

Submission status: Accepted

Solution code:
while 1:
	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)

Submission status: Accepted

Solution code:
cont = True

while cont:
    data = input().split(" ")
    a = int(data[0])
    b = int(data[2])
    op = data[1]
    if op == "?":
        cont = False
    elif op == "+":
        print(a+b)
    elif op == "-":
        print(a-b)
    elif op == "*":
        print(a*b)
    else:
        print(int(a/b))

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
# coding: utf-8

while True:
    valueA, operation, valueB = input().split(" ")
    if operation == "?":
        break
    elif operation == "+":
        result = int(valueA) + int(valueB)
    elif operation == "-":
        result = int(valueA) - int(valueB)
    elif operation == "*":
        result = int(valueA) * int(valueB)
    elif operation == "/":
        result = int(valueA) / int(valueB)
    print("{0}".format(int(result)))

Submission status: Accepted

Solution code:
# coding: utf-8

def toAdd(a, b):
    return int(a) + int(b)
    
def toSubtract(a, b):
    return int(a) - int(b)

def toMultiply(a, b):
    return int(a) * int(b)

def toDivide(a, b):
    return int(int(a) / int(b))
    
operations = {
    "+": toAdd,
    "-": toSubtract,
    "*": toMultiply,
    "/": toDivide
    }

while True:
    valueA, operation, valueB = input().split(" ")
    if operation == "?":
        break
    function = operations[operation]
    print("{0}".format(int(function(valueA, valueB))))

Submission status: Accepted

Solution code:
op = ""
while op != "?":
    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(int(a / b))
    elif op == "?":
        break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
loop = 1
while(loop):
    l = list(input().strip().split())
    a = int(l[0])
    b = int(l[2])
    op = l[1]

    if(op == "?"):
        loop = 0
        break;
    elif(op == "+"):
        ret = a + b
    elif(op == "-"):
        ret = a - b
    elif(op == "*"):
        ret = a * b
    elif(op == "/"):
        ret = a / b
    else:
        continue
    print(int(ret))

Submission status: Accepted

Solution code:
#!/usr/bin/python

n = []

while True:
  (a, b, c) = (i for i in input().split())
  if b == '?':
    break
  else:
    n.append((int(a),b,int(c)))

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

Submission status: Accepted

Solution code:
while 1:
	input_data = [i for i in input().split()]
	if input_data[1] == '?':
		break;
	a = int(input_data[0])
	op = input_data[1]
	b = int(input_data[2])
	if op == '+':
		print(a+b)
	elif op == '-':
		print(a-b)
	elif op == '*':
		print(a*b)
	elif op == '/':
		print(int(a/b))

Submission status: Accepted

Solution code:
while True:
    f = input()
    _, op, _ = f.split()

    if op == '?':
        break

    print(int(eval(f)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    formula = input().split()
    if '?' in formula:
        break
    a,b = int(formula[0]),int(formula[2])
    if formula[1] == '+':
        print(a+b)
    elif formula[1] == '-':
        print(a-b)
    elif formula[1] == '*':
        print(a*b)
    elif formula[1] == '/':
        print(a//b)

Submission status: Accepted

Solution code:
result = 0

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

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

  if op == '?':
    break

  print(output)

Submission status: Accepted

Solution code:
import math
while 1==1:
    a,op,b = map(str,input().split())
    if op == "+":
        s = int(a)+int(b)
        print(s)
    elif op == "-":
        sa = int(a)-int(b)
        print(sa)
    elif op == "*":
        seki = int(a)*int(b)                                                
        print(seki)
    elif op == "/":
        syou=math.floor(int(a)/int(b))
        print(syou)
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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(int(a / c))                                                   
    else:
        break

Submission status: Accepted

Solution code:
#! python3

while True:
  a, op, b = [x for x in input().strip().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)

Submission status: Accepted

Solution code:
from math import floor

while True:
    r = input().split()
    a = int(r[0])
    op = str(r[1])
    b = int(r[2])
    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"%(floor(a / b)))

Submission status: Accepted

Solution code:
while 1:
    x,y,z=(i for i in input().split())
    if y=='?':
        break
    elif y=='+':
        print(int(x)+int(z))
    elif y =='-':
        print(int(x)-int(z))
    elif y=='*':
        print(int(x)*int(z))
    else :
        print(int(x)//int(z))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p = lambda x,y:x+y
m = lambda x,y:x-y
t = lambda x,y:x*y
d = lambda x,y:x//y
operations = {'+':p, '-':m, '*':t, '/':d}

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
import sys
def ope(a,op,b):
	if op == '+': ret = a + b
	if op == '-': ret = a - b
	if op == '/': ret = int(a / b)
	if op == '*': ret = a * b
	if op == r'?': ret = 'end'
	return ret

while True:
	a,op,b = sys.stdin.readline().split()
	ret = ope(int(a) , op , int(b))
	if ret == 'end': break
	else: print(ret)

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
  a, op, b = line.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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
op = ""
A=[]
B=[]
C=[]
while not op == "?":
    a,op,b = map(str, input().split())
    A.append(int(a))
    B.append(int(b))
    C.append(op)


for i in range(len(A)-1):
    if C[i] =="+":
        print(A[i]+B[i])
    elif C[i] =="-":
        print(A[i] - B[i])
    elif C[i] =="*":
        print(A[i] * B[i])
    else:
        print(int(A[i] / B[i]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
	x, op, y = input().split()
	x, y = map(int, (x, y))
	if op == '?':
		break
	print(x + y if op == '+' else x - y if op == '-' else x * y if op == '*' else int(x / y))

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
n = []
while (True):
	x = list(input().split())
	if x[1] == '?':
		break
	elif x[1] == '+':
		n.append(int(x[0]) + int(x[2]))
		pass
	elif x[1] == '-':
		n.append(int(x[0]) - int(x[2]))
		pass
	elif x[1] == '*':
		n.append(int(x[0]) * int(x[2]))
		pass
	elif x[1] == '/':
		n.append(int(x[0]) / int(x[2]))
		pass
for i in n:
	print(int(i))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
	a,op,b=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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = (x for x in input().split())
    int_a = int(a)
    int_b = int(b)
    ans = 0

    if op == r"?" :break
    elif op == r"+":ans = int_a + int_b
    elif op == r"-":ans = int_a - int_b
    elif op == r"*":ans = int_a * int_b
    elif op == r"/":ans = int_a // int_b
    print(ans)

Submission status: Accepted

Solution code:
while True:
    x = raw_input().split()

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

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
while True:
    i = list(input().split(" "))
    a = int(i[0])
    op = i[1]
    b = int(i[2])
    if op == "?":
        break
    elif op == "+":
        print("{}".format(a+b))
    elif op == "-":
        print("{}".format(a-b))
    elif op == "*":
        print("{}".format(a*b))
    elif op == "/":
        print("{}".format(a//b))
    else :
        print("INVALID INPUT")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    try:
        print(int(eval(input())))
    except:
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
while True:
    a, op, b = map(str, input().split())
    a, b = int(a), int(b)
    if op=='+':
        print(math.floor(a+b))
    elif op=='-':
        print(math.floor(a-b))
    elif op=='*':
        print(math.floor(a*b))
    elif op=='/':
        print(math.floor(a/b))
    else:
        break

Submission status: Accepted

Solution code:
while True:
    i = input().split()
    if i[1] == "?":
        break
    if i[1] == "+":
        print(int(i[0])+int(i[2]))
    if i[1] == "-":
        print(int(i[0])-int(i[2]))
    if i[1] == "*":
        print(int(i[0])*int(i[2]))
    if i[1] == "/":
        print(int(int(i[0])/int(i[2])))
    pass

Submission status: Accepted

Solution code:
while True:
    [a, op, b] = [value for value in 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)
    else:
        print(a // b)

Submission status: Accepted

Solution code:
# Aizu Problem ITP_1_4_C: Simple Calculator
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


while True:
    a, op, b = input().split()
    if op == '?':
        break
    if op == '/':
        op = '//'
    print(eval(a + op + b))

Submission status: Accepted

Solution code:
import math

dataset = []
while True:
    s = input().split()

    if s[1] == '?':
        break
    else:
        dataset.append(s)

for i in dataset:
    formura = ''.join(i)
    print(math.floor(eval(formura)))

Submission status: Accepted

Solution code:
while True:
    x=input()
    if "?" in x:
        break
    print(int(eval(x.replace("/","//"))))

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
while 1:
	x=raw_input().split()
	op= x[1]
	a = int(x[0])
	b = int(x[2])

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()
    if op == '?':
        break
    if op == '/':
        op = '//'
    print(eval(a + op + b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
 
    x, y, z = input().split()
    l = int(x)
    r = int(z)
    if y == '+':
        print(l + r)
    elif y == '-':
        print(l - r)
    elif y == '/':
        print(l // r)
    elif y == '*':
        print(l * r)
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    a,op,b = map(str,raw_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 == "/":
        print a / b

Submission status: Accepted

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

Submission status: Accepted

Solution code:
I = input().split()
a = int(I[0])
e = I[1]
b = int(I[2])

while(True):
    if(e == '+'):
        print(a + b)
    if(e == '-'):
        print(a - b)
    if(e == '*'):
        print(a * b)
    if(e == '/'):
        print(int((float(a) / float(b))))
    if(e == '?'):
        break
    I = input().split()
    a = int(I[0])
    e = I[1]
    b = int(I[2])

Submission status: Accepted

Solution code:
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)
    else:
        print(a // b)

Submission status: Accepted

Solution code:
while 1:
    a = input().split()
    if 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]))

    if a[1] == "?":
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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