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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

def main():
    while True:
        s = input().split()
        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]))
        
        elif s[1] == '/':
            print(int(int(s[0]) / int(s[2])))
        
        else:
            sys.exit()
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    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
    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 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, b は int に変換せよ
  a, op, b = line.split()
  print(calc(op, int(a), int(b)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def get_op():

    line_list=[]
    
    while True:
        s1,op,s2=tuple(input().split())
        
        x=int(s1)
        y=int(s2)
        
        if op=="?":
            break
        
        line_list.append((x,op,y))
    
    return line_list
    
def apply_op(line_list):
    ls=[]
    
    for x,op,y in line_list:
        if op=="+":
            ls.append(x+y)
        elif op=="-":
            ls.append(x-y)
        elif op=="*":
            ls.append(x*y)
        elif op=="/":
            ls.append(int(x/y))
        else:
            pass


    return ls
    


ls=get_op()
result=apply_op(ls)
    
    
for i in result:
    print(i)

Submission status: Accepted

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

    if op == '?':
        break

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(10**5):
    s = input().split()
    if s[1] == "?":
        break
    else:
        if s[1] == "+":
            S = int(s[0])+int(s[2])
        elif s[1] == "-":
            S = int(s[0])-int(s[2])
        elif s[1] == "*":
            S = int(s[0])*int(s[2])
        elif s[1] == "/":
            S = int(s[0])//int(s[2])
        print(S)

Submission status: Accepted

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

for x in lis:
	a=x[0]
	b=x[1]
	op=x[2]
	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:
for i in range(20001):
    a,op,b=input().split()
    a=int(a)
    b=int(b)
    if op=='?':
        break
    elif op=='+':
        print(a+b)
    elif op=='-':
        print(a-b)
    elif op=='*':
        print(a*b)
    elif op=='/':
        print(int(a/b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    a = list(input().split())
    if a[1] == '+':
        ans.append(int(a[0]) + int(a[2]))
    elif a[1] == '-':
        ans.append(int(a[0]) - int(a[2]))
    elif a[1] == '*':
        ans.append(int(a[0]) * int(a[2]))
    elif a[1] == '/':
        ans.append(int(a[0]) // int(a[2]))
    else:
        break

for i in ans:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    X = input().split()
    a = int(X[0])
    b = int(X[2])
    op = X[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))
    elif op == "?":
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
        exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a_str,op,b_str=map(str,input().split())
    a=int(a_str)
    b=int(b_str)
    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()   # 3変数ともに文字列として読み込む
    a = int(a)                   # a を整数に変換
    b = int(b)                   # b を整数に変換
    if op==("?"):
        break
    if op==("+"):
        print(a+b)
    elif op==("-"):
        print(a-b)
    elif op==("*"):
        print(a*b)
    elif op==("/"):
        print(a//b)

Submission status: Accepted

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

    if (op == "?"):
        break

    elif (op == "+"):
        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:
    l = input().split()

    op = l.pop(1)
    a, b = map(int, l)

    if op == "?":
        break

    n = a + b if op == "+" else a - b if op == "-" else a * b if op == "*" else a // b
    print(n)

Submission status: Accepted

Solution code:
while (1):
    input_list = input().split(' ')

    val1 = int(input_list[0])
    op = input_list[1]
    val2 = int(input_list[2])

    if op == '?':
        break

    if op == '+':
        print(val1 + val2)
    elif op == '-':
        print(val1 - val2)
    elif op == '*':
        print(val1 * val2)
    else:
        print(int(val1 / val2))

Submission status: Accepted

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

while True:
    x = input()
    a, op, b = x.split()
    if op == '?':
        break
    else:
        result = eval(x)
        result = math.floor(result)
        print(f'{result:.0f}')

Submission status: Accepted

Solution code:
import math
while True:
    line=input()
    a=[]
    op=[]
    b=[]
    t = line.split(" ")
    a.append(int(t[0]))
    op.append(t[1])
    b.append(int(t[2]))

    if op[0] == "?":
        break
    else:
        if op[0] == "+":
            print(a[0]+b[0])
        elif op[0] == "-":
            print(a[0]-b[0])
        elif op[0] == "*":
            print(a[0]*b[0])
        else:
            print(math.floor(a[0]/b[0]))

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:
for i in range(0,20001):

    line = list(map(str, input().split()))
    a = int(line[0])
    b = int(line[2])
    op = line[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:
# coding: utf-8
# Your code here!
while True:
    a,op,b=input().split()
    if op=="?":
        break
    a=int(a)
    b=int(b)
    if op=="+":
        x=a+b
    elif op=="-":
        x=a-b
    elif op=="*":
        x=a*b
    else:
        x=a//b
    print(x)

Submission status: Accepted

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

    if op == "+":
            print(str(a+b))

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

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

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

    elif op == "?":
        break

Submission status: Accepted

Solution code:
i = 0
while i < 10**5:
    i = i + 1
    a, op, b = input().split()
    a = int(a); b = int(b); op = str(op)
    
    if op == '?':
        break
    
    if op == '+':
        x = a+b
    elif op == '-':
        x = a-b
    elif op == '*':
        x = a*b
    else:
        x = int(a/b)
    print(x)

Submission status: Accepted

Solution code:
# coding: utf-8
# 36
while True:
    S = input().split()
    #print(S,S[0],S[1],S[2])
    if S[1]=='?':
        break
    print('%d'%(eval(S[0]+S[1]+S[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))
    else:
        print(int(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=='?':
        break

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

Submission status: Accepted

Solution code:
def calculate(A, B, C):
    if B == '+':
        print(A + C)
    elif B == '-':
        print(A - C)
    elif B == '*':
        print(A * C)
    elif B == '/':
        print(A // C)


while True:
    formula = input().split()
    a = int(formula[0])
    b = formula[1]
    c = int(formula[2])
    if b == '?':
        break
    calculate(a, b, c)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p=1
while p==1:
    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))
    else:
        print(int(a)//int(c))

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

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

Submission status: Accepted

Solution code:
while True :
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    0 <= a,b <= 2 * 10**4 
    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:
# coding: utf-8
# Your code here!
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(int(a*b))
    elif op=='/':
        print(int(a/b))
    elif op=='?':
        break
    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(int(a*b))
    elif op=='/':
        print(int(a/b))
    elif op=='?':
        break
    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)
    elif op=="/":
        print(a//b)

Submission status: Accepted

Solution code:
while True :
    x,y,z=input().split()
    x=int(x)
    z=int(z)
    if y== "+" : print(int(x+z))
    elif y == "-" : print(int(x-z))
    elif y == "*" : print(int(x*z))
    elif y == "/" : print(int(x/z))
    else : break

Submission status: Accepted

Solution code:
while True:
    a,op,b = raw_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:
import math
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:
        x=a%b
        y=a//b
        if x==0:
            print(int(y))
        else:
            print(format(y, '.0f'))
    
print('', end='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    if op == "?":   
        break

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

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

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

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

Submission status: Accepted

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

    raw = input().split()
    ope = raw.pop(1)
    a, b = map(int, raw)
    
    if ope == "+":
        result = a + b
    elif ope == "-":
        result = a - b
    elif ope == "*":
        result = a * b
    elif ope == "/":
        result = a // b
    else:
        break
        
    print(result)

Submission status: Accepted

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

    if s[1]=="?":
       break
    if s[1]=="+":
        print(a+b)
    if s[1]=="-":
        print(a-b)
    if s[1]=="*":
        print(a*b)
    if s[1]=="/" :
        print(a//b)

Submission status: Accepted

Solution code:
x = 0
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
        
    x += 1

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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:
list = []
while True:
    a = input().split()
    if '?' in a:
        break
    else:
        list.append(a)

for x in list:
    if '+' in x:
        print(int(x[0]) + int(x[2]))
    elif '-' in x:
        print(int(x[0]) - int(x[2]))
    elif '*' in x:
        print(int(x[0]) * int(x[2]))
    elif '/' in x:
        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(int(a) / int(b)))
    else:
        print(int(a) % int(b))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
try:
 while 1:print(int(eval(input())))
except:pass