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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = 0
while i < 10000:
    c, o, d = map(str, input().split())
    a = int(c)
    b = int(d)
    if o == '+':
        print(a+b)
    elif o == '-':
        print(a-b)
    elif o == '*':
        print(a*b)
    elif o == '/':
        print(a/b)
    elif o == '?':
        break

Submission status: Wrong Answer

Solution code:
i = 0
while i < 10000:
    c, o, d = map(str, input().split())
    a = int(c)
    b = int(d)
    if o == '+':
        print(a+b)
    elif o == '-':
        print(a-b)
    elif o == '*':
        print(a*b)
    elif o == '/':
        print(round(a/b), 0)
    elif o == '?':
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=input().split()
a=int(x[0])
op=x[1]
b=int(x[2])
if op=="+":
  print(a+b)
elif op=="-":
   print(a-b)
elif op=="*":
   print(a*b)
elif op=="/":
   print(a/b)
else:
    exit

Submission status: Wrong Answer

Solution code:
x=input().split()
a=int(x[0])
op=x[1]
b=int(x[2])
if op=="+":
  print(a+b)
elif op=="-":
   print(a-b)
elif op=="*":
   print(a*b)
elif op=="/":
   print(a/b)
else:
     print( exit)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,o,b = input().split()
a,b = map(int,(a,b))

Submission status: Wrong Answer

Solution code:
a,o,b = input().split()
a,b = map(int,(a,b))
print(a+b if o=='+' else a-b if o=='-' else a*b if o=='*' else a/b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#! python3
# simple_calculator.py

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

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

Submission status: Wrong Answer

Solution code:
a,b,c = map(str,input().split())
a,c =int(a),int(c)
if b =='+':
	print(a+c)
elif b == '-' : print(a-c)
elif b == '*' : print(a*c)
elif b == '/' : print(a/c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 b==0:
        continue
    else:
        print(round(a/b))

Submission status: Wrong Answer

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 b==0 or a==0:
        continue
    else:
        print(round(a/b))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math


x = input().split()
n1 = float((x[0]))
n2 = float(x[2])
op = str(x[1])

try:
    result = eval("{} {} {}".format(n1, op, n2))
    print(math.floor(result))
except:
    pass

Submission status: Wrong Answer

Solution code:
import math


x = input().split()
n1 = float((x[0]))
n2 = float(x[2])
op = str(x[1])

try:
    result = eval("{}{}{}".format(n1, op, n2))
    print(str(math.floor(result)))
except:
    pass

Submission status: Wrong Answer

Solution code:
x = input()
try:
    result = eval(x)
    print(int(result))
except:
    pass

Submission status: Wrong Answer

Solution code:
a,b,c= input().split()
a = int(a)
c = int(c)
#print(a)
#print(a,b,c)

if b == "+":
    print(a + c)
elif b == "-":
    print(a - c)
elif b == "*":
    print(a * c)
elif b == "/":
    print(a / c)
elif b == "?":
    pass

Submission status: Wrong Answer

Solution code:
a,b,c= input().split()
a = int(a)
c = int(c)
#print(a)
#print(a,b,c)

if b == "+":
    print(a + c)
elif b == "-":
    print(a - c)
elif b == "*":
    print(a * c)
elif b == "/":
    print(a // c)
elif b == "?":
    pass

Submission status: Wrong Answer

Solution code:
a,b,c= input().split()
a = int(a)
c = int(c)


if b == "+":
    print(a + c)
elif b == "-":
    print(a - c)
elif b == "*":
    print(a * c)
elif b == "/":
    print(a // c)
elif b == "?":
    pass

Submission status: Wrong Answer

Solution code:
def calc(a):
    if a[1]=="+": return int(a[0])+int(a[2])
    elif a[1]=="-": return int(a[0])-int(a[2])
    elif a[1]=="/": return int(a[0])/int(a[2])

res=[]
while 1:
    b=input().split()
    if b[1]=="?":break
    res.append([calc(b)])
[print(i) for i in res]

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
a,op,c=input().split()
a=int(a)
c=int(c)

if op=="+":
    print(a+c)
if op=="-":
    print(a-c)
if op=="*":
    print(a*c)
if op=="/":
    print(a//c)

Submission status: Wrong Answer

Solution code:
def checker(list):
    for i in list:
        if i['op'] == '+':
            print(i['a'] + i['b'])
        elif i['op'] == '-':
            print(i['a'] - i['b'])
        elif i['op'] == '*':
            print(i['a'] * i['b'])
        elif i['op'] == '/':
            print(i['a'] / i['b'])


formula_list = []
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    dict = {'a': a, 'op': op, 'b': b}
    formula_list.append(dict)
    if op == '?':
        break
checker(formula_list)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# Simple Calculator

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

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

Submission status: Wrong Answer

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: Wrong Answer

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 == '/' and int(b) != 0):
        print(int(a) / int(b))
    elif (op == '?' ):
        break

Submission status: Wrong Answer

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 == '/' and int(b) != 0):
        print(int(a) / int(b))
    elif (op == '?' ):
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 == '/' and int(b) != 0):
        print(int(a) / int(b))
    elif (op == '?' ):
        break
    else:
        break

Submission status: Wrong Answer

Solution code:
def main():
    while True:
        a, op, b = input().split()
        a = int(a)
        b = int(b)

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if __name__ =='__main__':
    answer()

Submission status: Wrong Answer

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

if __name__ =='__main__':
    answer()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
while True:
    a, op, b = raw_input().split()
    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: Wrong Answer

Solution code:
while True:
    a, op, b = raw_input().split()
    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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

import sys

equation = raw_input().split(" ")

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

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

sys.exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
from sys import stdin
import sys
(a, op, b) = stdin.readline().split()
a = int(a)
b = int(b)
if op == "?":
 sys.exit()
elif op == "+":
 print(a + b)
elif op == "-":
 print(a - b)
elif op == "*":
 print(a * b)
elif op == "/":
 print(a / b)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import sys
(a, op, b) = stdin.readline().split()
a = int(a)
b = int(b)
if op == "?":
 sys.exit()
elif op == "+":
 print(a + b)
elif op == "-":
 print(a - b)
elif op == "*":
 print(a * b)
elif op == "/":
 print(float(a / b))

Submission status: Wrong Answer

Solution code:
from sys import stdin
import sys
(a, op, b) = stdin.readline().split()
a = int(a)
b = int(b)
if op == "?":
 sys.exit()
elif op == "+":
 print(a + b)
elif op == "-":
 print(a - b)
elif op == "*":
 print(a * b)
elif op == "/":
 if a / b < 1:
  print(0)
 else:
  print(a / b)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import sys
(a, op, b) = stdin.readline().split()
a = int(a)
b = int(b)
if op == "?":
 sys.exit()
elif op == "+":
 print(a + b)
elif op == "-":
 print(a - b)
elif op == "*":
 print(a * b)
elif op == "/":
 if a / b < 1:
  print(a // b)
 else:
  print(a / b)

Submission status: Time Limit Exceeded

Solution code:
a,op,b = input().split()

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

while True:
	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: Time Limit Exceeded

Solution code:
a,op,b = input().split()

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#coding:UTF-8

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

while True:
    if op == '+':
        print a + b
    elif op == '-':
        print a - b
    elif op == '*':
        print a * b
    elif op == '/':
        print a / b
    else:
        break

Submission status: Time Limit Exceeded

Solution code:
x = raw_input().split()
a,op,b = x[0],x[1],x[2]
while 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: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
[a,op,b]=[x for x in input().split()]
a=int(a)
b=int(b)
while True:
    if a==0 and b==0:
        break
    elif op=="+":
        print(a+b)
    elif op=="-":
        print(a-b)
    elif op=="*":
        print(a*b)
    else:
        print(a//b)

Submission status: Time Limit Exceeded

Solution code:
a,op,b=input().split()

while True:
    if op == "?":
        break
    else:
        if op == "+":
            print(int(a)+int(b))
        elif op == "-":
            print(int(a)-ing(b))
        elif op == "*":
            print(int(a)*int(b))
        elif op == "/":
            Print (int (a) //int (b))
        else:
            print("error")

Submission status: Time Limit Exceeded

Solution code:
a, op, b = (input().split())

a = int(a)
b = int(b)
while True:
    if op == "+":
        print(a +b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a / b)
    else:
        break

Submission status: Time Limit Exceeded

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

while True:
  
  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: Time Limit Exceeded

Solution code:
x, op, y = input().split()
x = int(x)
y = int(y)
while not (x == 0 and y == 0 and op == "?") :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)

Submission status: Time Limit Exceeded

Solution code:
l = [str(i) for i in input().split()]

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

while True:

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


def main():
    while True:
        list1 = [i for i in sys.stdin.readline().split()]
        if '?' in list1:
            break
        a, b, op = int(list1[0]), int(list1[2]), list1[1]
        if op == '+':
            print(a + b)
        elif op == '-':
            print(a - b)
        elif op == '*':
            print(a * b)
        else:
            print(int(a / b))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
v = 0
i = 0
b = []
while v == 0:
    a = input().split()
    if a[1] == '+':
        b.append(int(a[0])+int(a[2]))
        i = int(i) + 1
    elif a[1] == '-':
        b.append(int(a[0])-int(a[2]))
        i = int(i) + 1
    elif a[1] == '*':
        b.append(int(a[0])*int(a[2]))
        i = int(i) + 1
    elif a[1] == '/':
        b.append(int(a[0])//int(a[2]))
        i = int(i) + 1
    else:
        v = 1

for j in range(int(i)):
    print(b[j])

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

Submission status: Accepted

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

for i in b:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding : utf-8
while True:
    aa, op, bb = input().split()
    if op == '?':
        break
    a = int(aa)
    b = int(bb)
    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:
ans = []

while True:
    tmp = input().split()

    a, b = map(int, [tmp[0], tmp[2]])
    op = tmp[1]

    if op == "?":
        break
    if op == "+":
        ans.append(a + b)
    if op == "-":
        ans.append(a - b)
    if op == "*":
        ans.append(a * b)
    if op == "/":
        ans.append(a // b)

print("\n".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    inputs = input().split(' ')
    a = int(inputs[0])
    op = inputs[1]
    b = int(inputs[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:
while 1:
    n = input()
    if "?" in n:
        break
    print(int(eval(n)))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
# ITP1_4_C


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

Submission status: Accepted

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

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:
import math
while True:
    s=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(math.floor(int(s[0])/int(s[2])))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = []
for s in open(0).readlines():
    if "?" in s:
        break
    ans.append(eval(s.strip().replace("/", "//")))
print(*ans, sep='\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:
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