Problem:

Simple Calculator

Write a program which reads two integers a, b and an operator op, and then prints the value of a op b.

The operator op is '+', '-', '*' or '/' (sum, difference, product or quotient). The division should truncate any fractional part.

Input

The input consists of multiple datasets. Each dataset is given in the following format.

a op b

The input ends with a dataset where op = '?'. Your program should not process for this dataset.

Output

For each dataset, print the value in a line.

Constraints

  
 0 ≤ a, b ≤ 20000

No divisions by zero are given.

Sample Input 1

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

Sample Output 1

3
38
26
10
108



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


Sample output:
3
38
26
10
108

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = []
while True:
    a,op,b = raw_input().split()
    if op == "+":
        ans.append(int(a)+int(b))
    elif op == "-":
        ans.append(int(a)-int(b))
    elif op == "*":
        ans.append(int(a)*int(b))
    elif op == "/":
        ans.append(int(a)/int(b))
    else:
        break
for char in ans:
    print char

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

l = []
for i in sys.stdin:
    l.append(i.split())

for i in range(0,len(l)):
    if len(l[i]) == 3:
        if l[i][1] == '+':
            result = int(l[i][0]) + int(l[i][2])
        elif l[i][1] == '-':
            result = int(l[i][0]) - int(l[i][2])
        elif l[i][1] == '*':
            result = int(l[i][0]) * int(l[i][2])
        elif l[i][1] == '/':
            result = int(l[i][0]) / int(l[i][2])
        else:
            break
        print(int(result))

Submission status: Accepted

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

Solution code:
while(True):
    n  = input()
    if '?' in n:
        break

    print(int(eval(n)))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a=[]
b=[]
op=[]
while(True):#"?"が入るまでループ
    x,symbol,y = map(str,input().split())
    if symbol == "?":
        break
    else:
        a.append(int(x))
        b.append(int(y))
        op.append(symbol)
for i in range(len(a)):#計算分け
    if op[i] == "+":
        print(a[i]+b[i])
    elif op[i] == "-":
        print(a[i]-b[i])
    elif op[i] == "*":
        print(a[i]*b[i])
    elif op[i] == "/":
        print(int(a[i]/b[i]))

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

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

Submission status: Accepted

Solution code:
while True:
    I = input().split()
    op = I.pop(1)
    if op == "?":
        break
    a,b = tuple(int(n) for n in I)
    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:
  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: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! python3
# simple_calculator.py

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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
        x = a[0]; op = a[1]; y = a[2]
        if op == "+": print(x + y)
        elif op == "-": print(x - y)
        elif op == "*": print(x * y)
        elif op == "/": print(x // y)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
while True:
    a, op, b = [i for i in 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:
    x = input()
    if "?" in x: break
    result = eval(x)
    print(int(result))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def operations():
    if op == '+':
        return a + b
    elif op == '-':
        return a - b
    elif op == '*':
        return a * b
    else:
        return a // b


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8

while True:
   A = raw_input().split()
   if A[1] == '?':
      break
   if A[1] == '+':
      print(int(A[0])+int(A[2]))
   if A[1] == '-':
      print(int(A[0])-int(A[2]))
   if A[1] == '*':
      print(int(A[0])*int(A[2]))
   if A[1] == '/':
      print(int(A[0])/int(A[2]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
	arr = list(map(str, input().split()))
	a = int(arr[0])
	b = int(arr[2])
	op = arr[1]
	
	if op == '+':
		print(a + b)
	elif op == '-':
		print(a - b)
	elif op == '*':
		print(a * b)
	elif op == '/':
		print(int(a / b))
	else:
		break

Submission status: Accepted

Solution code:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

import sys

if __name__ == '__main__':
    line = None
    while 1:
        line = raw_input()
        a, op, b = line.split()
        if op == '+':
            print int(a) + int(b)
        elif op == '-':
            print int(a) - int(b)
        elif op == '*':
            print int(a) * int(b)
        elif op == '/':
            print int(a) / int(b)
        elif op == '?':
        	break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while True:
    a,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:
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: Accepted

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

Solution code:
data = []
while True:
    a, op, b = map(str, input().split())
    if op == "?":
        break
    data.append([a, op, b])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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 =math.floor(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: Accepted

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

Submission status: Accepted

Solution code:
import math

def calc(op, a, b):
    if op == '+':
        return int(a) + int(b)
    elif op == '-':
        return int(a) - int(b)
    elif op == '*':
        return int(a) * int(b)
    elif op == '/':
        return math.floor(float(a) / float(b))

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

    if op == "?":
        break

    print(calc(op, a, b))

Submission status: Accepted

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

while True:
    a, op , b = raw_input().split()
    if op == "?":
        break
    print(calc(int(a), op, int(b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = 0
while r == 0:
        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] == "?":
                break
        else:
                print "error"

Submission status: Accepted

Solution code:
from __future__ import division, print_function
from sys import stdin, exit
from operator import add, sub, mul, floordiv
d = {'+': add, '-': sub, '*': mul, '/': floordiv, '?': lambda a,b: exit(0)}
while True:
    a, op, b = stdin.readline().split()
    print(d[op](int(a), int(b)))

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    a, op, b = line.rstrip('\n').split(' ')
    if op == '+':
        print '%d' % (int(a) + int(b))
    elif op == '-':
        print '%d' % (int(a) - int(b))
    elif op == '*':
        print '%d' % (int(a) * int(b))
    elif op == '/':
        print '%d' % (int(a) / int(b))
    elif op == '?':
        break

Submission status: Accepted

Solution code:
while True:
    (m,n,o)=map(str, raw_input().split())
    m,o=int(m),int(o)
    if n=='?': break
    elif n=='+': print m+o
    elif n=='-': print m-o
    elif n=='*': print m*o
    elif n=='/': print m/o
    else: pass

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while(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: Accepted

Solution code:
#!/usr/bin/python

import sys
while 1:
  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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Solution code:
from sys import stdin

while True:
    (a, op, b) = stdin.readline().split(' ')
    a = int(a)
    b = int(b)
    if op == "?":
        break;
    elif op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while (1):
    x,op,y = input().split()
    x=int(x)
    y=int(y)
    if op == "+":
        print(x+y)
    elif op == "-":
        print(x-y)
    elif op == "*":
        print(x*y)
    elif op == "/":
        print(int(x/y))
    else:
        break

Submission status: Accepted

Solution code:
i = 0

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

Submission status: Accepted

Solution code:
#W, H, x, y, r = map(int, input().split())
def main():

    input_array_list = []

    while True:
        input_array = input().split()
        if input_array[1] == "?":
            break
        else:
            input_array_list.append(input_array)

    for item in input_array_list:
        if item[1] == "+":
            print(str(int(item[0])+int(item[2])))
        elif item[1] =="-":
            print(str(int(item[0])-int(item[2])))
        elif item[1] == "/":
            print(str(int(item[0])//int(item[2])))
        elif item[1] == "*":
            print(str(int(item[0])*int(item[2])))

main()

# import sympy as sp

# input_list = []
# a,b,c = map(int, input().split())
# divisors = sp.divisors(c)
#
# count = 0
#
# for divisor in divisors:
#     if a <= divisor and divisor <= b:
#         count = count + 1
# print(count)
#
# while True:
#     pair_str = input().split()
#     pair_int = [int(s) for s in pair_str]
#     if pair_int[0] == 0 and pair_int[1] == 0 :
#         break
#     else:
#         input_list.append(pair_int)
#
# for pair_int in input_list:
#     if pair_int[0] <= pair_int[1]:
#         print("{} {}".format(pair_int[0], pair_int[1]))
#     else:
#         print("{} {}".format(pair_int[1], pair_int[0]))

#for i in range(10000):
#    print("Hello World")
#a = input().split()
#a_int = [int(s) for s in a]
#a_sorted = sorted(a_int)
#print(' '.join(map(str, a_sorted)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(100000):
    s = input().rstrip().split(" ")
    a = int(s[0])
    b = s[1]
    c = int(s[2])
    if b =="?":
        break
    if b == "+":
        print(a+c)
    if b == "-":
        print(a-c)
    if b == "*":
        print(a*c)
    if b == "/":
        print(int(a/c))

Submission status: Accepted

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