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:
def calculator(a, b, op):

    res = None

    if op == "?":
        pass
    elif op == "+":
        print(str(int(a + b)))

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

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

    elif op == "/":
        res = a / b
        print(str(int(a / b)))
    
    else:
        pass


if __name__ == "__main__":

    while(1):


        param = input()
        param = param.split(" ")
        
        a = int(param[0])
        op = param[1]
        b = int(param[2])

        if op != "?":
            calculator(a, b, op)
        else:
            break

Submission status: Accepted

Solution code:
for i in range(100):
    a = input()
    if "?" in a:
        break
    print(int(eval(a)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
S = open(0).read().split()
for a, op, b in zip(*[iter(S)]*3):
    if op == '?':
        break
    print(int(math.floor(eval(a+op+b))))

Submission status: Accepted

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

    if op == "?":
        break

    if op == "+":
        r = a+b
    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:
    lis = input().split()
    a = int(lis[0])
    b = lis[1]
    c = int(lis[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 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:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    #a,b=list(map(int,input().split()))
    a,op,b=input().split()
    while op!="?":
        if op=="/":op="//"
        print(eval(a+op+b))
        a, op, b = input().split()

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


def main():
    while True:
        a,op,b= input().split()
        a,b = map(int,(a,b))
        if op == '?':
            break
        else:
            res = Simple_Calculator(a,b,op)
            print("%d" %(res))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
  
for s in sys.stdin:
    if '?' in s:
        break
    else:
        a_str,op,b_str = s.split()
        a,b = int(a_str),int(b_str)

        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 1 == 1:
    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 = map(str,input().split())

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

Submission status: Accepted

Solution code:
while 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(a) // int(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(int(a/c) )
  elif b == "*":
    print(a*c)
  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("%d" % (a+b))
    if op == "-":
        print("%d" % (a-b))
    if op == "*":
        print("%d" % (a*b))
    if op == "/":
        print("%d" % (a/b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
OPERATORS = {
    "+": lambda x, y: x + y,
    "-": lambda x, y: x - y,
    "*": lambda x, y: x * y,
    "/": lambda x, y: x // y
}


# OP_PL = "+"
# OP_MN = "-"
# OP_MP = "*"
# OP_DV = "/"

while True:
    a, b, c  = input().split()
    a = int(a)
    c = int(c)
    if b == "?":
        break
    print(OPERATORS.get(b)(a, c))

Submission status: Accepted

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

  if op == "?": break

  r = 0
  a = int(a)
  b = int(b)

  if op == "+":
    r = a + b
  elif op == "-":
    r = a - b
  elif op == "*":
    r = a * b
  elif op == "/":
    r = a / b

  print(int(r))

Submission status: Accepted

Solution code:


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
for i in range(10**6):
  a,b,c = map(str,input().split())
  if b == "?":
    break
  else:
    if 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:
import math

loop = 1
while loop == 1:
    a, op, b = (x for x in input().split())

    if op == "+":
        ans = int(a)+int(b)
    elif op == "-":
        ans = int(a)-int(b)
    elif op == "*":
        ans = int(a)*int(b)
    elif op == "/":
        ans = math.floor(int(a)/int(b))
    else:
        loop = 0
        break

    print(ans)

Submission status: Accepted

Solution code:
while(True):
    line=input().rstrip().split(' ')
    a=int(line[0])
    b=int(line[2])
    c=line[1]

    if c=="+":
        print(a+b)
    elif c=="-":
        print(a-b)
    elif c=="*":
        print(a*b)
    elif c=="/":
        print(a//b)
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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
    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
string=input().split()
while not ('?' in string):
    if string[1]=='+':
        print(int(string[0])+int(string[2]))
    elif string[1]=='-':
        print(int(string[0])-int(string[2]))
    elif string[1]=='*':
        print(int(string[0])*int(string[2]))
    else:
        print(int(string[0])//int(string[2]))
    string=input().split()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    e =""
    nums = [str(e) for e in input().split()]
    if nums[1] == "+":
        print ("{0}".format(int(nums[0]) + int(nums[2])))
    elif nums[1] == "-":
        print ("{0}".format(int(nums[0]) - int(nums[2])))
    elif nums[1] == "*":
        print ("{0}".format(int(nums[0]) * int(nums[2])))
    elif nums[1] == "/":
        print ("{0}".format(int(nums[0]) // int(nums[2])))
    else:
        exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

while True:
    a, op , b = input().split()
    
    if op == "+":
        result = int(a) + int(b)
    elif op == "-":
        result = int(a) - int(b)
    elif op == "*":
        result = int(a) * int(b)
    elif op == "/":
        result = math.floor(int(a) / int(b))
    elif op == "?":
        break;

    print(result)

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:

op = 'a'

while op != '?':
    l = input().split()
    a = int(l[0])
    b = int(l[2])
    op = l[1]
    answer = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = map(str, input().split())
    if op == '?':
        break

    a_num = int(a)
    b_num = int(b)

    if op == '+':
        print(a_num + b_num)
    elif op == '-':
        print(a_num - b_num)
    elif op == '*':
        print(a_num * b_num)
    else:
        print(int(a_num / b_num))

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:
def main():
    a, op, b = (i for i in input().split())
    while op != '?':
        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)
        a, op, b = (i for i in input().split())

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while True:

    a,op,b=input().split()

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

    if op=='?':
        break

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

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(int(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)
    else:
        break

Submission status: Accepted

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

    if op =='+':
        c = a+b
        print(c)
    elif op =='-':
        d = a-b
        print(d)
    elif op =='*':
        e = a*b
        print(e)
    elif op =='/':
        f =a/b
        print(int(f))
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    list_input = input().split()
    calculate = {'+': lambda a, b: a + b,
                 '-': lambda a, b: a - b,
                 '/': lambda a, b: a // b,
                 '*': lambda a, b: a * b,
                 }
    if list_input[1] == '?':
        break
    else:
        print(calculate[list_input[1]](int(list_input[0]), int(list_input[2])))

Submission status: Accepted

Solution code:
x = []
i = 0

while True :
    a, op, b = input().split()
    c = int(a)
    d = int(b)
    
    if op == "?" :
        break
    
    if op == "+" :
        y = c + d
        x.append(y)
        i += 1
        
    if op == "-" :
        y = c - d
        x.append(y)
        i += 1
        
    if op == "*" :
        y = int(c * d)
        x.append(y)
        i += 1
        
    if op == "/" :
        y = int(c / d)
        x.append(y)
        i += 1
        
for j in range(0, i) :
    print(x[j])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while True:
    tmp = input().split(' ')
    a = int(tmp[0])
    b = int(tmp[2])
    if (tmp[1] == '+'):
        print(a+b)
    elif(tmp[1] == '-'):
        print(a-b)
    elif(tmp[1] == '/'):
        print(int(a/b))
    elif(tmp[1] == '*'):
        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 (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()
    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 1:
    a,b,c=input().split()
    if b=="?":break
    ans.append(eval(a+b+c))
for i in ans:
    print(int(i))

Submission status: Accepted

Solution code:
x = True
s_list = []
while x == True:
    s_list.append(input().split())
    if s_list[-1][1] == '?':
        x = False

a_list = []
for i in range(len(s_list)-1):
    if s_list[i][1] == '+':
        ans = int(s_list[i][0]) + int((s_list[i][2]))
        a_list.append(ans)
    elif s_list[i][1] == '-':
        ans = int(s_list[i][0]) - int((s_list[i][2]))
        a_list.append(ans)
    elif s_list[i][1] == '*':
        ans = int(s_list[i][0]) * int((s_list[i][2]))
        a_list.append(ans)
    elif s_list[i][1] == '/':
        ans = int(s_list[i][0]) // int((s_list[i][2]))
        a_list.append(ans)

for a in a_list:
    print(a)

Submission status: Accepted

Solution code:
exp = input()
while "?" not in exp:
    print(eval(exp.replace("/", "//")))
    exp = input()

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

Submission status: Accepted

Solution code:
import math

A = []
while True:
    a, b ,c = map(str, input().split())
    if b == "?":
        break
    else:
        B = [a,b,c]
        A.append(B)

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