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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while 1:
	x = raw_input().split()
	a,op,b = int(x[0]),x[1],int(x[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:
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:
	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 = raw_input().split()
    a = int(a)
    b = int(b)
    if op == "+":
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b
    elif op == "?":
        break

Submission status: Accepted

Solution code:
#coding: UTF-8

while True:

	l = raw_input().split()

	a = int(l[0])
	b = int(l[2])

	op =l[1]



	if op == "+":
		x = a + b
		print x

	if op == "-":
		x = a - b
		print x

	if op == "*":
		x = a * b
		print x

	if op == "/":
		x = a / b
		print "%d" %x


	if op == "?":
		break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ct=-1
a=[0]*100000
b=[0]*100000
c=[0]*100000
while True:
    ct+=1
    a[ct],b[ct],c[ct]=map(str,raw_input().split())
    if b[ct]=="?":
        break
    else:
        continue
for i in xrange(ct):
    if b[i]=="+":
        print(int(a[i])+int(c[i]))
    elif b[i]=="-":
        print(int(a[i])-int(c[i]))
    elif b[i]=="*":
        print(int(a[i])*int(c[i]))
    else:
        print(int(a[i])/int(c[i]))

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:
#coding:utf-8

ans = []
for i in xrange(20000):
    a, op, b = raw_input().split()
    if op == "?":
        break
    else:
        if op == "+":
            ans.append(int(a) + int(b))
        elif op == "-":
            ans.append(int(a) - int(b))
        elif op == "*":
            ans.append(int(a) * int(b))
        else:
            ans.append(int(a) / int(b))

for n in xrange(len(ans)):
    print(ans[n])

Submission status: Accepted

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

Submission status: Accepted

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

    if op in "+":
        print int(a)+int(b) 
    elif op in "-":
        print int(a)-int(b)
    elif op in "*":
        print int(a)*int(b)
    elif op in "/":
        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 == '+':
        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:
	a, op, b = raw_input().split()
	a = int(a)
	b = int(b)
	if op == '+':
		print a + b
	if op == '-':
		print a - b
	if op == '*':
		print a * b
	if op == '/':
		print a / b
	if op == '?':
		break

Submission status: Accepted

Solution code:
#coding:utf-8

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

for n in xrange(len(ans)):
    print(ans[n])

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:
    line = map(str, raw_input().split())
    x = int(line[0])
    op = line[1]
    y = int(line[2])
    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:
# encoding:utf-8

while True:
    a,op,b = map(str, input().split())
    c = int(a)
    d = int(b)
    if op == '+': result = c + d
    if op == '-': result = c - d
    if op == '*': result = c * d
    if op == '/': result = int(c / d)
    if op == '?': break
    print("{0}".format(result))

Submission status: Accepted

Solution code:
while True:
    s = raw_input().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 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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
class SimpleCalculator:
    def calc(self, a, op, b):
        if op == '+':
            print a + b
        elif op == '-':
            print a - b
        elif op == '*':
            print a * b
        elif op == '/':
            print a / b

if __name__ == "__main__":
    sc = SimpleCalculator()
    while True:
        a, op, b = map(str, raw_input().split())
        if op == "?":
            break
        sc.calc(int(a), op, int(b))

Submission status: Accepted

Solution code:
i = 1

while i == 1:
    x = raw_input()
    a, op, b = x.split(" ")
    a = int(a)
    b = int(b)
    
    if op == "?":
        i = 0
    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:
def num(v):
	try:
		return int(v)
	except Exception:
		return v

ALL_calc = []
while True:
	N =  input().split(' ')
	if N[1] == '?':
		break
		
	N_calc = []
	for i in range(len(N)):
		N_calc.append(num(N[i]))
	ALL_calc.append(N_calc)
	
for i in range(len(ALL_calc)):
	if ALL_calc[i][1] == '+':
		print(ALL_calc[i][0] + ALL_calc[i][2])
	elif ALL_calc[i][1] == '-':
		print(ALL_calc[i][0] - ALL_calc[i][2])
	elif ALL_calc[i][1] == '*':
		print(ALL_calc[i][0] * ALL_calc[i][2])
	elif ALL_calc[i][1] == '/':
		print(ALL_calc[i][0] // ALL_calc[i][2])

Submission status: Accepted

Solution code:
op = "$"

while op != "?":
	a, op, c = map(str, raw_input().split())
	a = int(a)
	c = int(c)

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

Submission status: Accepted

Solution code:
l=raw_input()
k=l.split()
a=int(k[0])
op=k[1]
b=int(k[2])
#
while op<>'?':
        if op=='+':
                print a + b
        if op=='-':
                print a - b
        if op=='*':
                print a * b
        if op=='/':
                print a / b
#
        l=raw_input()
        k=l.split()
        a=int(k[0])
        op=k[1]
        b=int(k[2])

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)

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

Submission status: Accepted

Solution code:
import sys

while(True):
    a, op, b = sys.stdin.readline().split()
    if(op == '?'):
        break
    a, b = map(int, [a, b])
    ans = 0
    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):
    vals = input().split()
    a = int(vals[0])
    op = vals[1]
    b = int(vals[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(1):
    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)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 08-Computation-Simple_Calculator.py

# ?¨???????
# ???????????´??° a, b ??¨?????????????????? op ?????????????????§???a op b ????¨??????????????????°?????????????????????????????????
# ????????????????????? op ??????"+"(???)???"-"(???)???"*"(???)???"/"(???)???????????¨?????????????????§????????????????????´??????????°???°?????\??????????????¨????????????????¨????????????¨????????????

# Input
# ??\???????????°????????????????????????????§???????????????????????????????????????????????????¢????????\????????¨????????§??????
# a op b
# op ??? '?' ?????¨??? ??\?????????????????????????????????????????±???????????????????????£????????????????????????
# Output
# ?????????????????????????????????????¨??????????????????????????????????????????????

# Constraints
# 0 ??? a, b ??? 20000
# 0 ?????????????????????????????????????????¨?????????????????????
# Sample Input
# 1 + 2
# 56 - 18
# 13 * 2
# 100 / 10
# 27 + 81
# 0 ? 0
# Sample Output
# 3
# 38
# 26
# 10
# 108

import sys

output = []


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

	if op=="+":
		output.append(a+b)
	elif op =="-":
		output.append(a-b)
	elif op =="*":
		output.append(a*b)
	elif op =="/":
		output.append( int(a/b) )
	elif op =="?":
		break;
	else:
		sys.exit()

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

Submission status: Accepted

Solution code:
ss = input("").split()
a = int(ss[0])
b = ss[1]
c = int(ss[2])

while b != "?":
    if b == "+":
        result = int(a + c)
    elif b == "-":
        result = int(a - c)
    elif b == "*":
        result = int(a * c)
    elif b== "/":
        result = int(a / c)

    print("{0}".format(result))
    ss = input("").split()
    a = int(ss[0])
    b = ss[1]
    c = int(ss[2])

Submission status: Accepted

Solution code:
while True:
    Input = input().split()
    a = int(Input[0])
    op = Input[1]
    b = int(Input[2])
    if a >= 0 and b >= 0 and a <= 20000 and b <= 20000:
        if op == "+":
            print(a + b)
        elif op == "-":
            print(a - b)
        elif op == "*":
            print(a * b)
        elif op == "/":
            if b != 0:
                print(int(a / b))
        elif op == "?":
            break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
	res = []
	while True:		
		try:
			res.append(int(eval(input())))
		except:
			[print(i) for i in res]
			return
if __name__ == '__main__':
  main()

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=='?': 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:
import math

while True:
    a, op, b = map(str, input().split())
    a = int(a)
    b = int(b)
    if 0 <= a and b < 20001:
        if op == "+":
            answer = a + b
            print(answer)
        elif op == "-":
            answer = a - b
            print(answer)
        elif op == "*":
            answer = a * b
            print(answer)
        elif op == "/":
            answer = a / b
            print(math.floor(answer))
        elif op == "?":
            break
    else:
        if op == "?":
            break
        else:
            continue

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 1:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Submission status: Accepted

Solution code:
import math

while 1 :
    a, op, b = raw_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
    else :
        break

Submission status: Accepted

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

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:
    arr = input().split()
    a = int(arr[0])
    op = arr[1]
    b = int(arr[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:
while True:
    l = list(input().split())
    a = int(l[0])
    op = l[1]
    b = int(l[2])
    
    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:
if __name__ == "__main__":
	list = {}
	i = 0
	while True:
		a,op,b = input().split()
		a,b = map(int,[a,b])
		if op == '+':
			list[i] = a+b
		elif op == '-':
			list[i] = a - b
		elif op == '*':
			list[i] = a*b
		elif op == '/':
			c = a/b
			list[i] = int(c)
		else:
			break
		i +=1
	for i in range(len(list)):
		print (list[i])

Submission status: Accepted

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

Submission status: Accepted

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

    if op == "?":
        break

    result = 0
    if op == "+":
        result = a + b
    elif op == "-":
        result = a - b
    elif op == "*":
        result = a * b
    elif op == "/":
        result = int(a / b)
    print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
while True:
    x = map(str, raw_input().split())
    if x[1] == '?':
        break
    if x[1] == '+':
        a.append(int(x[0]) + int(x[2]))
    if x[1] == '-':
        a.append(int(x[0]) - int(x[2]))
    if x[1] == '*':
        a.append(int(x[0]) * int(x[2]))
    if x[1] == '/':
        a.append(int(x[0]) / int(x[2]))
for i in range(len(a)):
    print a[i]

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calc(a, b, op):
    if op == "+":
        return a + b;
    elif op == "-":
        return a - b;
    elif op == "*":
        return a * b;
    elif op == "/":
        return a / b;
    elif op == "?":
        return None;

while True:
    a, op, b = input().split()
    result = calc(int(a), int(b), op)
    if result is not None:
        print(int(result));
    else:
        break;

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 = 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 = 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 = 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 = 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 = 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:
    abc = input()
    if '?' in abc:
        break
    print(eval(abc.replace('/','//')))

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

    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,b,c = input().split()
	num_1 = int(a)
	num_2 = int(c)

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

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:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op=="?":
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Submission status: Accepted

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

Submission status: Accepted

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

    a = int(L[0])
    o = (L[1])
    b = int(L[2])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    r = input()
    a = r.split(' ')
    if a[1] == '+':
        b = int(a[0])+int(a[2])
        print(b)
    elif a[1] == '-':
        c = int(a[0])-int(a[2])
        print(c)
    elif a[1] == '*':
        d = int(a[0])*int(a[2])
        print(d)
    elif a[1] == '/':
        e = int(a[0])//int(a[2])
        print(e)
    else:
        break

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readlines()
for i in s:
    if '?' in i:
        break
    print(eval(i.replace('/', '//')))

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 = input()
    if '?' in a:
        break
    print("{0}".format(eval(a.replace('/', '//'))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
#Simple Calculator

while 1:
    aopb = raw_input().split()
    if aopb[1] == "+":
        print int(aopb[0]) + int(aopb[2])
    elif aopb[1] == "-":
        print int(aopb[0]) - int(aopb[2])
    elif aopb[1] == "*":
        print int(aopb[0]) * int(aopb[2])
    elif aopb[1] == "/":
        print int(aopb[0]) / int(aopb[2])
    else:
        break

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 == '-':
		print a - b
	elif op == '*':
		print a * b
	elif op == '/':
		if b != 0:
			print a / b
	elif op == '?':
		break
	else:
		break

Submission status: Accepted

Solution code:
import sys

while True:
    data = sys.stdin.readline().strip().split(' ')
    a = int(data[0])
    b = int(data[2])
    op = data[1]
    if op == '?':
        break

    if 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 1:

    x,op,y = raw_input().split()

    if op == "?":
        break

    x = int(x)
    y = int(y)

    if op == "+":
        print x+y
    elif op == "-":
        print x-y
    elif op == "*":
        print x*y
    else:
        print x/y

Submission status: Accepted

Solution code:
while True:
    a = input()
    try:
        i = a.index('?')
    except:
        print(int(eval(a)))
    else:
        break

Submission status: Accepted

Solution code:
a = []
while True:
    x, op, y = input().split()
    if op == '?':
        break
    x = int(x); y = int(y)
    if op == '+':
        a.append('{}'.format(x+y))
    elif op == '-':
        a.append(x-y)
    elif op == '*':
        a.append(x*y)
    else:
        a.append(x//y)
for x in a:
    print('{}'.format(x))

Submission status: Accepted

Solution code:
a = []
while True:
    m,n,o = input().split()
    m=int(m)
    o=int(o)
    if n == "?":
        break
    if n=="+":
    	a.append(m+o)
    elif n=="-":
    	a.append(m-o)
    elif n=="*":
    	a.append(m*o)
    elif n=="/":
    	a.append(int(m/o))
 

for i in a:
	print(i)

Submission status: Accepted

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