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:
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:
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:
while True:
    a,op,b=input().split()
    a=int(a)
    b=int(b)
    if op=='+':
        print(f"{a+b}")
    elif op=='-':
        print(f"{a-b}")
    elif op=='*':
        print(f"{a*b}")
    elif op=='/':
        print(f"{a//b}")
    elif op=='?':
        break

Submission status: Accepted

Solution code:
import sys,math

def solve():
    while True:
        s = input()
        if "?" in s:
            break
        else:
            print(int(eval(s)//1))
    
solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

for i in range(1000):
    
    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))

Submission status: Accepted

Solution code:

for i in range(1000):
    
    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)

Submission status: Accepted

Solution code:
from sys import stdin

while True:
    a, op, b = stdin.readline().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: # op == "?"
        break

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
while(1):
    a,op,b=input().split(" ")
    a=int(a)
    b=int(b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
op = 'a'

while op != '?':
    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:
while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        break
    else:
        if op == "+":
            ans = a + b
        elif op == "-":
            ans = a-b
        elif op == "*":
            ans = a * b
        elif op == "/":
            rem = a%b
            if rem == 0:
                ans = int(a/b)
            else:
                ans = int(a/b)
    print(ans)

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("%d" % (a / b))
    else:
        print(a * b)

Submission status: Accepted

Solution code:
while(1):
    a = input()
    if a.split()[1] == "?":
        break
    eval("print(int("+a+"))")

Submission status: Accepted

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

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

Submission status: Accepted

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

a,b = int(a),int(b)
'''
###############################################################
#whileの中に入れないと同じデータセットでの計算をずっとし続ける#
###############################################################

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()  # 3変数ともに文字列として読み込む
    a = int(a)  # a を整数に変換
    b = int(b)  # b を整数に変換
    if op == '?':
        break
    elif op == '+':
        print("%d"%(a+b))
    elif op == '-':
        print("%d"%(a-b))
    elif op == '/':
        print("%d"%(a/b))
    else:
        print("%d"%(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)
    else:
        break

Submission status: Accepted

Solution code:
while 1:
    x=input().split()
    a=int(x[0])
    op=x[1]
    b=int(x[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))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(10000):
  x = input().split()
  a = int(x[0])
  op = x[1]
  b = int(x[2])
  if op == "+":
    A = a + b
    print(A)
  elif op == "-":
    B = a - b
    print(B)
  elif op == "*":
    C = a * b
    print(C)
  elif op == "/":
    D = a // b
    print(D)
  elif op == "?":
    break

Submission status: Accepted

Solution code:
import math

ans = []
while True:
	data = input().split()
	a = int(data[0])
	b = data[1]
	c = int(data[2])

	if b == '+':
		ans += [a+c]
	elif b == '-':
		ans += [a-c]
	elif b == '*':
		ans += [a*c]
	elif b == '/':
		ans += [math.floor(a/c)]
	elif b == '?':
		break
	else:
		break

for output in ans:
	print(output)

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)
    elif op == '?':
        break

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:
numbers_a = []
numbers_b = []
character = []

while True:
  a,op,b = input().split()
  if op == "?":
    break
  a = int(a)
  b = int(b)
  numbers_a.append(a)
  numbers_b.append(b)
  character.append(op)

for i in range(len(character)):
  
  if character[i] == "+" :
    x = numbers_a[i] + numbers_b[i]
    
  if character[i] == "-":
    x = numbers_a[i] - numbers_b[i]
    
  if character[i] == "*":
    x = numbers_a[i] * numbers_b[i]
    
  if character[i] == "/":
    x = numbers_a[i] // numbers_b[i]
    
  print(x)

Submission status: Accepted

Solution code:
def simple_calc(a, op, b):
    res = 0
    if op == "+":
        res = a + b
    elif op == "-":
        res = a - b
    elif op == "*":
        res = a * b
    elif op == "/":
        res = a// b

    return  res

if __name__ == "__main__":
    while True:
        a, op, b = input().split()
        if op == "?":
            break
        ans = simple_calc(int(a), op, int(b))
        print(f"{ans}")

Submission status: Accepted

Solution code:
while(True):
    f = input()
    s = f.split()
    if(s[1] == '?'):
        break
    if(s[1] == '/'):
        print((int)(s[0]) // (int)(s[2]))
    else:
        print(eval(f))

Submission status: Accepted

Solution code:
for i in range(10000):
    try:
        a = eval(input())
        print(int(a))
    except:
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
listA=[]
listOP=[]
listB=[]
count=0
while True:
    a,op,b=input().split()
    listA.append(int(a))
    listOP.append(op)
    listB.append(int(b))
    if op=="?":
        del listA[len(listA)-1]
        del listOP[len(listOP)-1]
        del listB[len(listB)-1]
        break
#入力パートここまで。計算出力パートここから
while count<=len(listA)-1:
    if listOP[count]=="+":
        print(listA[count]+listB[count])
    elif listOP[count]=="-":
        print(listA[count]-listB[count])
    elif listOP[count]=="*":
        print(listA[count]*listB[count])
    elif listOP[count]=="/":
        print(listA[count]//listB[count])
    else:
        print("ERROR")
    count+=1

Submission status: Accepted

Solution code:
while True:
    s=input().split()
    op=s[1]
    if not (op=="+" or op=="-" or op=="*" or op=="/"):
        break
    a=int(s[0])
    b=int(s[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:
    line = input().split()
    a = int(line[0])
    op = line[1]
    b = int(line[2])

    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:
i = 100
for i in range (i):
    a_list = [str(x) for x in input().split()]
    a = int(a_list[0])
    b = int(a_list[2])
    op = a_list[1]
    if op == '+':
        ab = a + b
        print(ab)
        i = i + 1
        continue
    elif op == '-':
        ab = a - b
        print(ab)
        i = i + 1
        continue
    elif op == '*':
        ab = a * b
        print(ab)
        i = i + 1
        continue
    elif op == '/':
        ab = a // b
        print(ab)
        i = i + 1
        continue
    elif op == '?':
        exit()

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))
	elif op == "?":
		break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(10000):
        a, op, b = 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))
            else:
                print(int(int(a) / int(b)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
ops = []
kekka = []

while True:
    op = [e for e in input().split()]
    if op[1]=="?":
        break
    ops.append(op)

for i in range(len(ops)):
    if ops[i][1]=="+":
        sum = int(ops[i][0]) + int(ops[i][2])
        kekka.append(sum)
    elif ops[i][1]=="-":
        hiku = int(ops[i][0]) - int(ops[i][2])
        kekka.append(hiku)
    elif ops[i][1]=="*":
        kakeru = int(ops[i][0]) * int(ops[i][2])
        kekka.append(kakeru)
    elif ops[i][1]=="/":
        waru = math.floor(int(ops[i][0]) / int(ops[i][2]))
        kekka.append(waru)

for j in kekka:
    print(int(j))

Submission status: Accepted

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

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)
    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()
    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:
while True:
    a,op,b=input().split()
    if op=='?': break
    eval("print( int(int(a) {0} int(b)) )".format(op))

Submission status: Accepted

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

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 = 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()
   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:

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('%d'%(int(a)/int(b)))
    elif(op == '?'):
        break;

Submission status: Accepted

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

 print('%d' %(ans))

Submission status: Accepted

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

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:
from sys import stdin

operate = {
    '+': lambda lhs, rhs: lhs + rhs,
    '-': lambda lhs, rhs: lhs - rhs,
    '*': lambda lhs, rhs: lhs * rhs,
    '/': lambda lhs, rhs: lhs // rhs,
}

while True:
    arr = (stdin.readline().rstrip().split())
    a, op, b = int(arr[0]), arr[1], int(arr[2])

    if op == '?':
        break

    answer = operate[op](a, b)

    print(answer)

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:
        if op == "?":
            break

Submission status: Accepted

Solution code:
ans = 0
while True:
    num = list(map(str,input().split()))
    if(num[1] == "?"): break
    a = int(num[0])
    b = int(num[2])
    op = num[1]
    if(op == "+"): ans=a+b
    elif(op == "-"): ans=a-b
    elif(op == "*"): ans=a*b
    elif(op == "/"): ans=a/b
    
    print("%d" %ans)

Submission status: Accepted

Solution code:
while True:
    a, op, b = list(input().split())
    if op == '?':
        break

    a = int(a)
    b = int(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)

Submission status: Accepted

Solution code:
while True:
    s = input().split()
    a = int(s[0])
    op = s[1]
    b = int(s[2])
    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:
  l = input().split()
  
  a = int(l[0])
  o = l[1]
  b = int(l[2])
  
  if o =='?':
    break
 
  if o == '+':
    print( '%d'%(a+b))
  elif o == '-':
    print('%d'%(a-b))
  elif o =='*':
    print('%d'%(a*b))
  else:
    o =='/'
    print('%d'%(a//b))

Submission status: Accepted

Solution code:
while True:
  a,op,b = map(str, 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:
ans=[]
while True:
    a=input()

    if '?' in a:
        break

    eval('ans.append(int({0}))'.format(a))

for a in ans:
    print(a)

Submission status: Accepted

Solution code:
while True:
  a, op, b = map(str, 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, op, b = map(str, 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, 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,op,b=map(str,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, op, b =map(str,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:
def az10():
    while True:
        xs = raw_input().split()
        a,op,b = int(xs[0]),xs[1],int(xs[2])
        if op == "?" : break
        if op == "+" : print (a + b)
        if op == "-" : print (a - b)
        if op == "*" : print (a * b)
        if op == "/" : print (a / b)

az10()

Submission status: Accepted

Solution code:
while True:
    [a,op,b] = raw_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:
def calc(a, op, b):
    if op == '+':
        return(a + b)
    if op == '-':
        return(a - b)
    if op == '*':
        return(a * b)
    if op == '/':
        return(a / b)
while True:
    a, op, b = raw_input().split()
    if op == '?':
        break
    print(calc(int(a), op, int(b)))

Submission status: Accepted

Solution code:
while 1:
    n=raw_input()
    if '?' in n: break
    else: print eval(n.replace(' ',''))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
method = {"+": lambda a, b: a + b,
		  "-": lambda a, b: a - b,
		  "*": lambda a, b: a * b,
		  "/": lambda a, b: a / b}
		
while True:
	args = raw_input().split(" ")
	if args[1] == "?":
		break
	else:
		a = int(args[0])
		op = args[1]
		b = int(args[2])
		print method[op](a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
line = sys.stdin.readline()
num = []
while line:
	a,op,b = line.split()
	if op == "+":
		num.append(int(a)+int(b))
	elif op == "-":
		num.append(int(a)-int(b))
	elif op == "*":
		num.append(int(a)*int(b))
	elif op == "/":
		num.append(int(a)/int(b))
	else:
		break
	line = sys.stdin.readline()
for i in num:
	print str(i)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    x = raw_input()
    i = x.split()
    if i[1]=="?": break
    print eval(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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