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

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

    a, op, b = input().split()
    a = int(a)
    b = int(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=='?':
    exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ls = []
ans = 0
while 1:
    ls1=(list(map(str,input().split())))
    if ls1[1] == "?":
        break
    else:
        ls.append(list(ls1))
        ls1.clear()
for i in range(len(ls)):
    if ls[i][1] == "+":
        ans = int(ls[i][0])+int(ls[i][2])
        print(ans)
    elif ls[i][1] == "-":
        ans = int(ls[i][0])-int(ls[i][2])
        print(ans)
    elif ls[i][1] == "*":
        ans = int(ls[i][0])*int(ls[i][2])
        print(ans)
    elif ls[i][1] == "/":
        ans = int(ls[i][0])//int(ls[i][2])
        print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def calc(a: int, op: str, b: int) -> int:
    if op == '+':
        return a + b
    if op == '-':
        return a - b
    if op == '*':
        return a * b
    return int(a / b)

def resolve():
    for line in sys.stdin:
        a, op, b = map(str, line.split())
        a = int(a)
        b = int(b)

        if op == '?':
            break

        # No using eval
        print(calc(int(a), op, int(b)))


resolve()

Submission status: Accepted

Solution code:
data = []
while True :
    l = input()
    data.append(l)
    if "?" in l :
        data.pop()
        break

for i in data :
    print(int(eval(i)))

Submission status: Accepted

Solution code:
for i in range (10000):
    a,op,b=input().split()
    if op == "?":
        break
    a=int(a)
    b=int(b)
    if op == "+":
        print(int(a+b))
    if op == "-":
        print(int(a-b))
    if op == "*":
        print(int(a*b))
    if op == "/":
        print(int(a/b))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while True:

    dataset = input().split(" ")

    a = int(dataset[0])
    op = dataset[1]
    b = int(dataset[2])
    sum = 0
    
    if op == "?":
        break
    elif op == "+":
        sum = a + b
    elif op == "-":
        sum = a - b
    elif op == "*":
        sum = a * b
    elif op == "/":
        sum = int(a / b)

    print(sum)

Submission status: Accepted

Solution code:
import math
while True:
    a,b,c=input().split()
    a=int(a)
    c=int(c)
    if b == "+":
        print("{}".format(a+c))
    elif b == "-":
        print("{}".format(a-c))
    elif b == "*":
        print("{}".format(a*c))
    elif b == "/":
        print("{}".format(a//c))
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import operator

ops = { "+": operator.add,
        "-": operator.sub,
        "/": operator.floordiv,
        "*": operator.mul}

while True:
    a,op,b = input().strip().split()
    a,b = int(a),int(b)
    if op == "?":
        break
    else:
        print(ops[op](a,b))

Submission status: Accepted

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

Submission status: Accepted

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

    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:
l = []
while True:
  a, op, b = list(map(str, input().split(' ')))
  a, b = [int(a), int(b)]
  ans = 0
  if op == '?':
    break
  if op == '+':
    ans = a + b
  if op == '-':
    ans = a - b
  if op == '/':
    ans = int(a / b)
  if op == '*':
    ans = a * b
  l.append(ans)
for n in l:
  print(n)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
while True:
    a,b,c=input().split()
    if b=="+":
        print("{}".format(int(float(a))+int(float((c)))))
    elif b=="*":
        print("{}".format(int(a)*int(c)))
    elif b=="-":
        print(int(a)-int(c))
    elif b=="/":
        print(math.floor(int(a)/int(c)))
    elif b=="?":
        break

Submission status: Accepted

Solution code:
while True:
    array = input().strip().split()
    x=int(array[0])
    y=int(array[2])
    if array[1]=="+":
        z=x+y
    elif array[1]=="*":
        z=x*y
    elif array[1]=="-":
        z=x-y
    elif array[1]=="/":
        z=x//y
    else:
        break
    print(z)

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

while True:
  val1, symbol, val2 = map(str,input().split())
  if symbol == "?":
    break
  elif symbol == "+":
    result = int(val1) + int(val2) 
  elif symbol == "-":
    result = int(val1) - int(val2)
  elif symbol == "*":
    result = int(val1) * int(val2)
  elif symbol == "/":
    result = int(val1) // int(val2)
  print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
inp = []
i = 0
j = 0

while True:
    inp.append(input().split())
    if inp[i][1] == "?":
        break
    i += 1

for j in range(i):
    if inp[j][1] == "+":
        print("%s" % (int(inp[j][0]) + int(inp[j][2])))
    elif inp[j][1] == "-":
        print("%s" % (int(inp[j][0]) - int(inp[j][2])))
    elif inp[j][1] == "*":
        print("%s" % (int(inp[j][0]) * int(inp[j][2])))
    elif inp[j][1] == "/":
        print("%d" % (int(inp[j][0]) / int(inp[j][2])))
    elif inp[j][1] == "%":
        print("%s" % (int(inp[j][0]) % int(inp[j][2])))
    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)
    else:
        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)
    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 1:
 a=input()
 if'?'in a:break
 print(int(eval(a)))

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
        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:
list = []
count = 0
flag = True

while flag:
    a,op,b=input().split()
    list.append((int(a),op,int(b)))
    if list[count][1]== "?":
        flag = False
    count += 1

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

"""
1 + 2
3 / 3
100 ? 100
"""

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()   
    a =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:
#-*-coding:utf-8-*-

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

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
while True:
    a, op, b = map(str, 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
    
    
    def x(a, op, b) :
    
    
        if op == "+" :
            return a + b
    
    
        elif op == "-" :
            return a - b 
        
    
        elif op == "*" :
            return a * b
            
        
        else :
            return a // b
            
    
    print(x(a, op, b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # 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 == "+":
        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()   # 3変数ともに文字列として読み込む
    a = int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換

    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
        if op == '+':
            print(a+b)
        if op == '-':
            print(a-b)
        if op == '*':
            print(a*b)
        if op == '/':
            print(a//b)
      
        

        # ここ処理を書いてください
        # else のなかです。この通りのインデントを付けてください。

Submission status: Accepted

Solution code:
while True:
    A, op, B = input().split()   # 3変数ともに文字列として読み込む
    A =int(A)                   # a を整数に変換
    B = int(B)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
        if op=="+":
            print(A + B)
        elif op=="-":
            print(A - B)
        elif op=="*":
            print(A * B)
        elif op=="/":
            print(A // B)
        # ここ処理を書いてください
        # else のなかです。この通りのインデントを付けてください。

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
        # ここ処理を書いてください
        # else のなかです。この通りのインデントを付けてください。
        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()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # 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=='?': 
        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=="?":
         break
    else:
        if op =="+":
                print(a+b)
        elif op =="-":
                 print(a-b)
        elif op =="*":
                 print(a*b)
        elif op=="/":
            if b==0:
                 pass
            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:
# 演習1-7
while True:
  a,op,b = map(str,input().split())
  a=int(a)
  b=int(b)
  if op == '+':
    result = a+b
    print(result)
  elif op == '-':
    result = a-b
    print(result)
  elif op =='*':
    result = a*b
    print(result)
  elif op=='/':
    result = a//b
    print(result)
  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:
    s=input()
    sep_li=s.split()
    a=int(sep_li[0])
    b=int(sep_li[2])
    op=sep_li[1]
    if b== "?":
        n+= 1
    elif op=="+":
        print(a+b)
    elif op=="-":
        print(a-b)
    elif op=="*":
        print(a*b)
    elif op== "/":
        print(a//b)
    elif op== "?":
        break

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
  a, op, b = line.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()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # 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=="?":
        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,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 True:
    a, op, b = input().split()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # 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=="?": # 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()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
        if op=="+":
            print(a+b)
        elif op=="-":
            print(a-b)
        elif op=="*":
            print(a*b)
        else:
            print(a//b)
            # ここ処理を書いてください
        # else のなかです。この通りのインデントを付けてください。

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    lista = input().split()
    a = int(lista[0])
    b = int(lista[2])
    op = lista[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, 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()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
        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 re

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

EOL = re.compile(r'^\w+\s\?\s\w+$')
MAX = 20000

for _ in range(MAX):
    line = input()
    if EOL.match(line):
        break
    
    a,op,b = line.split()
    print(calc(op, int(a), int(b)))

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:
        if op == "+":
            print(a+b)
        elif op == "-":
            print(a-b)
        elif op == "*":
            print(a*b)
        elif op == "/":
            print(a//b)
            #opが"?"以外の時
        # ここ処理を書いてください
        # else のなかです。この通りのインデントを付けてください。

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 == "0":
        exit(0)
    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,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:
    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
    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()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
      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()   # 3変数ともに文字列として読み込む
    a =int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換


    if op=="?": # opが"?"の時は終了
        break
    else:    #opが"?"以外の時
        if op=="+":
            print(a+b)
        elif op=="-":
            print(a-b) 
        elif op=="*":
            print(a*b)        
        elif op=="/":
            print(int(a/b))