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:
def main():
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        return False
    if op == "+":
        ans = a+b
    elif op == "-":
        ans = a-b
    elif op == "*":
        ans = a*b
    else:
        ans = a//b
    print(ans)
    return True

while main():
    pass

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:
# ITP1_4_C
x = []
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op =='+':
        ans = a + b
        x += [ans]
    if op =='-':
        ans = a - b
        x += [ans]
    if op =='*':
        ans = a * b
        x += [ans]
    if op =='/':
        ans = a // b
        x += [ans]
    if op =='?':
        break
for i in range(len(x)):
    print(x[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = []
while True:
    buf = input().split(' ')
    a = int(buf[0])
    op = buf[1]
    b = int(buf[2])
    if op == '?':
        break
    li.append((a, op, b))


for a, op, b in li:
    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:
    a,op,b = (x for x in 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:

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

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

    if op == "?":
        exit(0)
    elif op == "+":
        print(x+y)
    elif op == "*":
        print(x*y)
    elif op == "-":
        print(x-y)
    elif op == "/":
        print(int(x/y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

while True:
    x, op, y = map(str, input().split())
    if op == '?':
        break
    a = int(x)
    b = int(y)
    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 == '+':
        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:
    s1,s2,s3=input().split()
    a=int(s1)
    b=int(s3)
    if s2=="?":
        break
    elif s2=="+":
        print(a+b)
    elif s2=="-":
        print(a-b)
    elif s2=="*":
        print(a*b)
    elif s2=="/":
        print(int(a/b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def test():

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

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

		if i[1] == '?':
			break

		if i[1] == '+':
			print(a + b)
		elif i[1] == '-':
			print(a - b)
		elif i[1] == '*':
			print(a * b)
		elif i[1] == '/':
			print(a // b)

if __name__ == "__main__":
	test()

Submission status: Accepted

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

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:
s=1
while(s!=0):
    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)
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8
while True:
    A = list(map(str,input().split()))
    a = int(A[0])
    b = int(A[2])

    if A[1] == '+':
        print(a + b)
    elif A[1] == '-':
        print(a - b)
    elif A[1] == '*':
        print(a * b)
    elif A[1] == '/':
        print(a // b)
    elif A[1] == '?':
        break

Submission status: Accepted

Solution code:
calculator = []
while True:
    a_, op, b_ = input().split(' ')
    a = int(a_)
    b = int(b_)
    if op == '?':
        break
    calculator.append([a, op, b])

for line in calculator:
    a, op, b = line
    if op == '+':
        res = a + b
    elif op == '-':
        res = a - b
    elif op == '*':
        res = a * b
    elif op == '/':
        res = a // b
    else:
        print(f"{a},{op},{b}")
        raise RuntimeError
    print(res)

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

Submission status: Accepted

Solution code:
str = input()
while not(str.split()[1] == '?'):
	print(int(eval(str)))
	str = input()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
while True:
    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:
import sys

strs = sys.stdin.readline().split(' ')

while strs[1] != '?':
  num0 = int(strs[0])
  num1 = int(strs[2])
  op = strs[1]

  if op == '+':
    ret = num0 + num1
  elif op == '-':
    ret = num0 - num1
  elif op == '*':
    ret = num0 * num1
  elif op == '/':
    ret = num0 / num1

  print(int(ret))

  strs = sys.stdin.readline().split(' ')

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:
import math
while True:
    arr = input().split()
    a,b,c = int(arr[0]),arr[1],int(arr[2])
    if b == "?":
        break
    elif b == "+":
        print(a+c)
    elif b == "-":
        print(a-c)
    elif b == "*":
        print(a*c)
    elif b == "/":
        print(math.floor((a/c)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = 0

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

Submission status: Accepted

Solution code:
while 1:
    try:
        print(eval(input().replace(" ","").replace("/","//")))
    except:
        break

Submission status: Accepted

Solution code:
import math
while True:
    list = input().split()
    a = int(list[0])
    op = list[1]
    b = int(list[2])
    
    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))
         elif op == "/":
                print(math.floor(int(a) / int(b)))

Submission status: Accepted

Solution code:
while True:
    input_cmd = list(input().split())
    
    a = int(input_cmd[0])
    b = int(input_cmd[2])
    cmd = input_cmd[1]
    
    if cmd == '?':
        break
    elif cmd == '+':
        print(a + b)
    elif cmd == '-':
        print(a - b)
    elif cmd == '*':
        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 == '+': 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()
 a=int(a)
 b=int(b)
 if op=="?":	
   break 
 if op=="+":
  w=a+b
  print(int(w)) 
 elif op=="-":
  x=a-b
  print(int(x))
 elif op=="*":
  y=a*b
  print(int(y))
 elif op=="/":
  z=a/b
  print(int(z))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = tuple(input().split())
    a = int(a)
    b = int(b)

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

Submission status: Accepted

Solution code:
s = input()
while '?' not in s.split()[1]:
    print(eval(''.join(s.replace('/', '//'))))
    s = input()

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=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=="/":
        if b==0:
            break
        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)
    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
    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()
    x = int(a)
    y = int(b)

    if op == '?':
        break
    elif op == '+':
        print(x + y)
    elif op == '-':
        print(x - y)
    elif op == '*':
        print(x * y)
    elif op == '/':
        print(x // y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


while True:
    line = input()
    element = line.split(' ')
    a = int(element[0])
    b = int(element[2])
    op = element[1]
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(math.floor(a / b))

Submission status: Accepted

Solution code:
import sys
def evaluate(s):
    a,op,b = s.split()
    a=int(a)
    b=int(b)
    if op=='+':
        return a+b
    if op=='-':
        return a-b
    if op=='*':
        return a*b
    if op=='/':
        return a//b
    if op=='?':
        sys.exit(0)

while True:
    s =input()
    print(evaluate(s))

Submission status: Accepted

Solution code:
n = "kksohandsome"
while (n != "0 ? 0"):
    n = input()
    if ('?' in n):break
    print(int(eval(n)))

Submission status: Accepted

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

    if '?' == op:
        break

    ans = 0

    if '+' == op:
        ans = int(a) + int(b)
    elif '-' == op:
        ans = int(a) - int(b)
    elif '*' == op:
        ans = int(a) * int(b)
    else:
        ans = int(a) // int(b)

    print(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(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    else:
        print(a // b)

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:
if __name__ == "__main__":
    while True:
        variables = input().split(" ")
        a = int(variables[0])
        op = variables[1]
        b = int(variables[2])

        if (op == '?'):
            break

        if ('+' == op):
            print(f"{a + b}")
        elif ('-' == op):
            print(f"{a - b}")
        elif ('*' == op):
            print(f"{a * b}")
        elif ('/' == op):
            print(f"{a // b}")

Submission status: Accepted

Solution code:
op = 0
while op != "?":
    a,op,b = input().split()
    a = int(a)
    b = int(b)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while True:
    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
# Your code here!

def calculater(a, b, key):
    a = int(a)
    b = int(b)
    if key == '+':
        Answer = a + b
    elif key =='-':
        Answer = a - b
    elif key == '*':
        Answer = a * b
    elif key == '/':
        Answer = a //b
    return Answer
for _ in range(100):
    a, key, b = input().split()
    if key == '?':
        break
    else:
        Answer = calculater(a, b, key) 
        print(Answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    if op == "+":
        c = a + b
        print("{0}".format(c))
    elif op == "-":
        c = a - b
        print("{0}".format(c))
    elif op == "*":
        c = a * b
        print("{0}".format(c))
    elif op == "/":
        c = int(a / b)
        print("{0}".format(c))
    elif op == "?":
        break

Submission status: Accepted

Solution code:
while True:
    [x,op,y]=input().split(" ")
    if op == "?":
        break
    
    a=int(x)
    b=int(y)

    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:
    q = input()
    if '?' in q:
        break
    print(int(eval(q)))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
array = []
while True:
	LIST = []
	INPUT = [ n for n in input().split()]
	a = int(INPUT[0])
	opperant = INPUT[1]
	b = int(INPUT[2])
	if opperant == '?':
		break
		
	LIST.append(a)
	LIST.append(opperant)
	LIST.append(b)
	array.append(LIST)
	
	 
for i in range(len(array)):
	 	
	if array[i][1] == '+':
		print(array[i][0] + array[i][2])
	 
	elif array[i][1] == '-':
		print(array[i][0] - array[i][2])
	 	
	elif array[i][1] == '*':
		print(array[i][0] * array[i][2])
	 	
	else:
		print(int(array[i][0] / array[i][2]))

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,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 = 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:
    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))
    elif op == '/':
        print('%d' % (a / b))
    else:
        print('invalid input')

Submission status: Accepted

Solution code:

while True:
    a,op,b = input().split()
    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
    elif op == "?":
        break
    print(ans)

Submission status: Accepted

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

    a = int(table[0])
    b = int(table[2])
    op = table[1]
    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:
	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:
    L=input().split( )
    a=int(L[0])
    b=int(L[2])
    op=L[1]
    if op =="?":
        break
    elif op =="+":
            print(f"{a+b}")

    elif op =="-":
        print(f"{a-b}")
    elif op =="*":
        print(f"{a*b}")

    elif op =="/":
        print(f"{int(a/b)}")
    elif op =="?":
        print(f"{a+b}")

Submission status: Accepted

Solution code:
#from numpy import*
#from scipy import*
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby
from operator import mul
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
#input=sys.stdin.readline  #危険！基本オフにしろ！
sys.setrecursionlimit(10**6)


def main():
    while True:
        s=input()
        if "?" in s:
            break
        else:
            print(int(eval(s)))
    
    
if __name__ == '__main__':
    main()

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)
    else:
        raise ValueError(a, op, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)
  if op == '?' :
    break

Submission status: Accepted

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