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:
    Input = input().split()
    a = int(Input[0])
    op = Input[1]
    b = int(Input[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:
while True:
    a,op,b=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()
    a=int(a)
    b=int(b)
    if op=='+' or op=='-' or op=='*' or op=='/':
        if op=='+':
            print(a+b)
        if op=='-':
            print(a-b)
        if op=='*':
            print(int(a*b))
        if op=='/':
            print(int(a/b))
    else:
        break

Submission status: Accepted

Solution code:
def test_case():
    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(int(a/b))
        elif op == '?':
            break


if __name__ == "__main__":
    test_case()

Submission status: Accepted

Solution code:
while True:
    a, op, b = (x for x in 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)
    else:
        print(int(a / b))

Submission status: Accepted

Solution code:
while True:
    x,y,z = map(str,input().split())
    x = int(x)
    z = int(z)

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

Submission status: Accepted

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

  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:
def main():
    while True:
        stdin = input()
        a, op, b = int(stdin.split()[0]), stdin.split()[
            1], int(stdin.split()[2])
        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 =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)
    elif op == '%':
        print(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:
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:
import math

while True:
    a, op, b = input().split()
    
    if op == '+':
        x = int(a) + int(b)
        print(x)   
    elif op == "-":
        y = int(a) - int(b)
        print(y)
    elif op == "*":
        kake = int(a) * int(b)
        print(kake)
    elif op == "/":
        wari = int(a) / int(b)
        print(math.floor(wari))
    elif op == "?":
        break

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()
    if op == '?': exit()
    num = list(map(int, [a, b]))
    a, b = num[0], num[1]
    if op == '+' : result = a + b
    if op == '-' : result = a - b
    if op == '*' : result = a * b
    if op == '/' : result = a // b
    print(result)

Submission status: Accepted

Solution code:
while True:
  a,b,c = list(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(a//c)

Submission status: Accepted

Solution code:
def main():
    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(int(a / b))
    return 0


if __name__ == "__main__":
    main()

Submission status: Accepted

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

    if op == "?":
        break

    if op == "+":
        ans_list.append(a + b)
    if op == "-":
        ans_list.append(a - b)
    if op == "*":
        ans_list.append(a * b)
    if op == "/":
        ans_list.append(a // b)

for ans in ans_list:
    print(ans)

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, 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)
    elif op == '?':
        break

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 == "+":
        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,b,c = input().split()
    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)
    if b == "?":
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    line = input().split()
    a = int(line[0])
    op = line[1]
    b = int(line[2])
    
    def add(a, b):
        add = a + b
        return add
    def sub(a, b):
        sub = a - b
        return sub
    def mul(a, b):
        mul = a * b
        return mul
    def div(a, b):
        div = a // b
        return div
    
    if op == '+':
        print(add(a, b))
    elif op == '-':
        print(sub(a, b))
    elif op == '*':
        print(mul(a, b))
    elif op == '/':
        print(div(a, b))
    else:
        break

Submission status: Accepted

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

while True:
    val = list(input().split())
    if val[1] == '?':
        break
    else:
        cal_list.append(val)

for CALC in cal_list:
    x, y = int(CALC[0]), int(CALC[2])
    if CALC[1] != '/':
        eval('print(x' + CALC[1]+ 'y)')
    else:
        eval('print(x' + CALC[1]+ '/y)')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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


if __name__ == '__main__':
    while True:
        a, op, b = (i for i in input().split())
        if op == '?':
            break
        else:
            print(calc(int(a), op, int(b)))

Submission status: Accepted

Solution code:
while 1:
    a,op,b=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 = 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:
ans = []
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        break
    else:
        if op == "+":
            ans.append(a+b)
        elif op == "-":
            ans.append(a-b)
        elif op == "*":
            ans.append(a*b)
        elif op == "/":
            ans.append(a//b)
for an in ans:
    print(an)

Submission status: Accepted

Solution code:
import operator

while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == '?':
        break
    elif op == '+':
        print(operator.add(a, b))
    elif op == '-':
        print(operator.sub(a, b))
    elif op == '*':
        print(operator.mul(a, b))
    else:
        print(operator.floordiv(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:
def tashizan(a, b):
    c = a + b
    return c


def hikizan(a, b):
    c = a - b
    return c


def kakezan(a, b):
    c = a * b
    return c


def warizan(a, b):
    c = a // b
    return c


def hantei(op):
    if op == "+":
        ans = tashizan(a, b)
    elif op == '-':
        ans = hikizan(a, b)
    elif op == '*':
        ans = kakezan(a, b)
    elif op == '/':
        ans = warizan(a, b)
    return ans


while True:
    a, op, b = input().split()   # 3変数ともに文字列として読み込む
    a = int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換
    
    if op == "?":
        break
    else:
        print(hantei(op))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
	aaa = list(input().split())
	a = int(aaa[0])
	op = aaa[1]
	b = int(aaa[2])
	if op == '?':
		exit(0)
	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:
def add(x, y):
    return x + y


def sub(x, y):
    return x - y


def mul(x, y):
    return x * y


def div(x, y):
    return x // y


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

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

    if op == "+":
        print(add(a, b))
    elif op == "-":
        print(sub(a, b))
    elif op == "*":
        print(mul(a, b))
    elif op == "/":
        print(div(a, b))
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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 == '/' and b != 0:
        print(a // b)
    else:
        None

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a,op,b = [x for x in input().split()]
    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))
    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)
    else:
        break

Submission status: Accepted

Solution code:
cal_list = input().split()

while cal_list[1] != "?":
    if cal_list[1] == "+":
        print(int(cal_list[0]) + int(cal_list[2]))
    elif cal_list[1] == "-":
        print(int(cal_list[0]) - int(cal_list[2]))
    elif cal_list[1] == "/":
        ans = int(cal_list[0]) / int(cal_list[2])
        print(int(ans))
    else:
        print(int(cal_list[0]) * int(cal_list[2]))
    cal_list = input().split()

Submission status: Accepted

Solution code:
a, op, b = 0, '', 0
while op != '?':
    a, op, b = input().split()
    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:
import math
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(math.floor(a / b))
    elif op == "?":
        break

Submission status: Accepted

Solution code:
calc_list = list()

while True:
    calc = {}
    base = input("")
    term = base.split(' ')
    a = int(term[0])
    op = term[1]
    b = int(term[2])
    if(op == '?'):
        break
    calc = {'a':a, 'op':op, 'b':b}
    calc_list.append(calc)

for ca in calc_list:
    if(ca['op'] == '+'):
        print("{}".format(ca['a'] + ca['b']))
    elif(ca['op'] == '-'):
        print("{}".format(ca['a'] - ca['b']))
    elif(ca['op'] == '*'):
        print("{}".format(ca['a'] * ca['b']))
    elif(ca['op'] == '/'):
        print("{}".format(ca['a'] // ca['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)
    else :
        print(a*b)

Submission status: Accepted

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

    if op == '?':
        exit()
    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()
    a=int(a)
    b=int(b)

    if op == "?":
        break

    elif op == "+":
        print(a + b)

    elif str(op) == "-":
        print(a - b)

    elif str(op) == "*":
        print(a * b)

    elif str(op) == "/":
        print(a // b)

    else:
        break

Submission status: Accepted

Solution code:
def operand(a, op, b):
    if op == '+':
        return int(a) + int(b)
    
    elif op == '-':
        return int(a)- int(b)

    
    elif op == '*':
        return int(a) * int(b)
    
    else:
        return int(a) // int(b) 

list = []
while True:
    a, op, b = map(str, input().split())
    if op == '?':
        break
    list.append([a, op, b])

for i in range(len(list)):
    print(operand(list[i][0], list[i][1], list[i][2]))

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:
    line = input().split()
    a,b,c= line[0],line[1],line[2]
    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(int(a)/int(c)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
  s=input()
  if s.split()[1]=="?":exit()
  print(int(eval(s)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

for i in range(100):
    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, ope, b = input().split()
  result = 0
  if ope == '?':
    break

  if ope == '+':
    result = int(a) + int(b)
  elif ope == '-':
    result = int(a) - int(b)
  elif ope == '*':
    result = int(a) * int(b)
  elif ope == '/':
    result = int(int(a) / int(b))
  print(result)

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
    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 = 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))
    else :
        pass

Submission status: Accepted

Solution code:
a = []
op = []
b = []

while True:
    a1, op1, b1 = input().split()
    a1 = int(a1)
    b1 = int(b1)
    if op1 == '?':
        break
    elif op1 == '+':
        print(a1+b1)
    elif op1 == '-':
        print(a1-b1)
    elif op1 == '*':
        print(a1*b1)
    elif op1 == '/':
        print(a1//b1)

Submission status: Accepted

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

    if op == '?':
        break

    if op == '+':
        print(a + b)
    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