Problem:

Simple Calculator

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

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

Input

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

a op b

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

Output

For each dataset, print the value in a line.

Constraints

  
 0 ≤ a, b ≤ 20000

No divisions by zero are given.

Sample Input 1

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

Sample Output 1

3
38
26
10
108



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


Sample output:
3
38
26
10
108

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
for e in sys.stdin:
    a, op, b = e.split()
    a = int(a)
    b = int(b)
    if op == "+":
        print("%d"%(a+b))
    if op == "-":
        print("%d"%(a-b))
    if op == "*":
        print("%d"%(a*b))
    if op == "/":
        print("%d"%(a/b))
    if op == "?":
        break

Submission status: Accepted

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

for each_data in data_setlist:
    if each_data[1] == '+':
        print(int(each_data[0]) + int(each_data[2]))
    if each_data[1] == '-':
        print(int(each_data[0]) - int(each_data[2]))
    if each_data[1] == '*':
        print(int(each_data[0]) * int(each_data[2]))
    if each_data[1] == '/':
        if int(each_data[2]):
            print(int(int(each_data[0])/int(each_data[2])))

Submission status: Accepted

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

Submission status: Accepted

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

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

    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 = 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:
        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:
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:
for i in range (0,10000) :
    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:
  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()
    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:
while True:
    a, op, b = (x for x in input().split())
    if(op == "+"): print(int(a) + int(b))
    elif(op == "-"): print(int(a) - int(b))
    elif(op == "*"): print(int(a) * int(b))
    elif(op == "/"): print(int(a) // int(b))
    else: break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    s = input().split()
    if s[1] == '?':
        break
    elif s[1] == '/':
        s[1] = '//'
    print(eval(' '.join(s)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list = []
while(True):
    a, op, b = input().split()
    if op =='?':
        break
    else:
        list.append(eval(a+op+b))


for ans in list:
    print(int(ans))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


for x in sys.stdin:
    if '?' in x:
        break
    print(eval(x.replace('/', '//')))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

for list in range(100):
  a, op, b = map(str, input().split())

  if op == "+":
    output = int(a) + int(b)
    print(output)
  elif op == "-":
    output = int(a) - int(b)
    print(output)
  elif op == "*":
    output = int(a) * int(b)
    print(output)
  elif op == "/":
    output = float(a) / float(b)
    print(math.floor(output))
  elif op == "?":
    break

Submission status: Accepted

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

    a = int(num[0])
    b = int(num[2])
    op = num[1]
    
    if op == "+":
        print(a + b)
    
    if op == "-":
        print(a - b)
    
    if op == "*":
        print(a * b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a = []
while True:
    try:
        a.append(list(input().split()))

    except:
        break
for i in range(len(a)):
    if a[i][1] == '+':
        print(int(a[i][0])+int(a[i][2]))
    elif a[i][1] == '-':
        print(int(a[i][0])-int(a[i][2]))
    elif a[i][1] == '*':
        print(int(a[i][0])*int(a[i][2]))
    elif a[i][1] == '/':
        print(math.floor(int(a[i][0])/int(a[i][2])))
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(20000):
    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:
  inp = input()
  aopb= inp.split()
  a = int(aopb[0])
  b = int(aopb[2])
  op = aopb[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(int(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 == '+':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:
    a,b,c = map(str,input().split())
    if b == "?":
        break
    elif b == "+":
        print(int(a)+int(c))
    elif b == "-":
        print(int(a)-int(c))
    elif b == "/":
        print(int(a)//int(c))
    elif b == "*":
        print(int(a)*int(c))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
sys.setrecursionlimit(100001)

# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===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)
    else:
        exit(0)

Submission status: Accepted

Solution code:
while True:
    s = input().split()
    if s[1] == "?":
        break
    if 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]))
    else:
        print(int(s[0])//int(s[2]))

Submission status: Accepted

Solution code:
while 1:
   a,op,b=input().split()
   if op=="?":
       break

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

Submission status: Accepted

Solution code:
import math
while True:
 s = input().rstrip().split(' ')
 a = int(s[0])
 mark = str(s[1])
 b = int(s[2])
 if mark == "+":
  print(a + b)
 elif mark == "-":
  print(a - b)
 elif mark == "*":
  print(a * b)
 elif mark == "/":
  print(math.floor(a / b))
 elif mark == "?":
  break;

Submission status: Accepted

Solution code:
#2020-03-18
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:
    x,op,y=input().split()
    x=int(x)
    y=int(y)
    if op=='?':
        break
    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 = input().split()   # 3変数ともに文字列として読み込む
    a = int(a)                   # a を整数に変換
    b = int(b)                   # 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:
ans = []

while True:
    line = list(input().split())
    if '?' in line:
        break
    if '/' == line[1]:
        line[1] = '//'
    ans.append(line)

for l in ans:
    print(eval(''.join(l)))

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("%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)

    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:
    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:
    s = input().split()
    if s[1] == "?":
        exit()
    print(int(eval("".join(s))))

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

Submission status: Accepted

Solution code:
OP = {
    '+': lambda a,b: int(a) + int(b),
    '-': lambda a,b: int(a) - int(b),
    '*': lambda a,b: int(a) * int(b),
    '/': lambda a,b: int(a) // int(b)
}
while True:
    a, op, b = [x for x in input().split()]
    if op == '?':
        break
    print(OP[op](a, b))

Submission status: Accepted

Solution code:
def input_preprocessing():
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    return a, op, b

a = 0
op = ''
b = 0
dataset = []
while op != '?':
    a, op, b = input_preprocessing()
    dataset.append([a, op, b])

def calc(a, op, b):
    if op == '?': return
    elif op == '+': return print(a+b)
    elif op == '-': return print(a-b)
    elif op == '*': return print(a*b)
    elif op == '/': return print(a//b)
    return

for data in dataset:
    calc(data[0], data[1], data[2])

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

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

    if op == "?":
        break
    elif op == "+":
        print("{}".format(a + b))
    elif op == "-":
        print("{}".format(a - b))
    elif op == "*":
        print("{}".format(a * b))
    elif op == "/":
        print("{}".format(math.floor(a / b)))
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 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:
    a, b, c = input().split()
    d = int(a)
    e = int(c)
    if b == '+':print(d + e)
    if b == '-':print(d - e)
    if b == '*':print(d * e)
    if b == '/':print(d // e)
    if b == '?':break

Submission status: Accepted

Solution code:
# 計算機

while True:
    calc_formula = input()
    op = calc_formula.split()
    a = int(op[0])
    b = int(op[2])
    if op[1]=="?": # stop condition
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    input_value = input()

    a, operator, b = input_value.split()

    if operator == '?':
        break

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

    if operator == '+':
        answer = a + b
    elif operator == '-':
        answer = a - b
    elif operator == '*':
        answer = a * b
    elif operator == '/':
        answer = a // b

    print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = []
count = 0
ans = []
while True:
  x.append(input().split())
  if x[count][1] == "?":
    break
  count += 1
for i in range(count + 1):
  if x[i][1] == "+":
    ans.append(int(x[i][0]) + int(x[i][2]))
  elif x[i][1] == "-":
    ans.append(int(x[i][0]) - int(x[i][2]))
  elif x[i][1] == "*":
    ans.append(int(x[i][0]) * int(x[i][2]))
  elif x[i][1] == "/":
    ans.append(int(x[i][0]) // int(x[i][2]))
  else:
    for j in ans:
      print(j)

Submission status: Accepted

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

    if way == "+":
        print(a + b)
    elif way == "-":
        print(a - b)
    elif way == "*":
        print(a * b)
    elif way == "/":
        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 == "+":
        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 == "+":
        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:
    line = input()
    if '?' in line:
        break

    print(int(eval(line)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(int(a)/int(b)))
    elif (op == "?"):
            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:
while True:
    a, op, b= list(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:
lis = []
while True:
    a = [i for i in input().split()]
    if a[1] == "?":
        break
    else:
        lis.append(a)

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

Submission status: Accepted

Solution code:
shuru = input().split()
n = 0
while str(shuru[1]) !='?':
    if str(shuru[1]) == '+':
        result = int(shuru[0]) +int(shuru[2]) 
        print('%d'%result)
    if str(shuru[1]) == '-':
        result = int(shuru[0]) - int(shuru[2])
        print('%d'%result)
    if str(shuru[1]) == '*':
        result = int(shuru[0]) *int(shuru[2])
        print('%d'%result)
    if str(shuru[1])  == '/' and str(shuru[2]) != '0':
        result = int(shuru[0]) / int(shuru[2])
        print('%d'%result)
    n = n + 1
    shuru = input()
    shuru = shuru.split()

Submission status: Accepted

Solution code:
i = input()
i = i.split()
n=0
while str(i[1]) !="?":
    if str(i[1]) == "+":
        op = int(i[0])+int(i[2])
        print(op)
    if str(i[1]) == "-":
        op = int(i[0])-int(i[2])
        print(op)
    if str(i[1]) == "*":
        op = int(i[0]) * int(i[2])
        print(op)
    if str(i[1]) == "/" and str(i[2]) != 0:
        op = int(i[0]) / int(i[2])
        print('%d'%op)
    n=n+1
    i = input()
    i = i.split()

Submission status: Accepted

Solution code:
def main():
  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
  
if __name__ == "__main__":
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a,op,b = input().split()
    if "?" in op:
        break
    asn = eval(f"{a} {op} {b}")
    print(int(asn))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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