Problem:

Simple Calculator

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

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

Input

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

a op b

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

Output

For each dataset, print the value in a line.

Constraints

  
 0 ≤ a, b ≤ 20000

No divisions by zero are given.

Sample Input 1

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

Sample Output 1

3
38
26
10
108



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


Sample output:
3
38
26
10
108

Submission status: Accepted

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

Submission status: Accepted

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

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

    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(" ")
    if op == "?":
        break
    a, b = int(A), int(B)
    if op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(int(a * b))
    elif op == "/":
        print(int(a / b))

Submission status: Accepted

Solution code:
ans_list = list()

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

for ans in ans_list:
    print(ans)

Submission status: Accepted

Solution code:

for i in range(0,10000):
  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 = list(input().split())
  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
  elif op == "?":
    break

  print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys

#tmp= int(input())
#tmp= float(input())
while(1):
    tmp = input().split()
#a,b = list(map(lambda a: int(a), tmp))

    a=int(tmp[0])
    b=int(tmp[2])
    op=tmp[1]

#print(a)
#print(op)
#print(b)
    if(op=="+"):
        print(a+b)
    if(op=="-"):
        print(a-b)
    if(op=="*"):
        print(a*b)
    if(op=="/"):
        print(a//b)
    if(op=="?"):
        sys.exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    val = input().split()
    op = val[1]
    int_val = [val[0], val[2]]
    int_val = [int(n) for n in int_val]

    if op == '?':
        break
    else:
        if op == '+':
            ret = int_val[0] + int_val[1]
        elif op == '-':
            ret = int_val[0] - int_val[1]
        elif op == '*':
            ret = int_val[0] * int_val[1]
        elif op == '/':
            ret = int_val[0] // int_val[1]
        print(ret)

Submission status: Accepted

Solution code:
inputs = []
while True:
    s = input().split(' ')
    if s[1] == '?':
        break
    t = ' '.join(s)
    inputs.append(int(eval(t)))
for ans in inputs:
    print(ans)

Submission status: Accepted

Solution code:
while True:
    a =input()
    if '?' in a:
        break
    else:
      print("%d" %eval(a))

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    x, m, y = map(str, input().split())
    if m == '?':
        break
    a.append(x)
    b.append(y)
    M.append(m)

a = list(map(int, a))
b = list(map(int, b))

for i in range(len(a)):
    if M[i] == '+':
        print(a[i] + b[i])
    elif M[i] == '-':
        print(a[i] - b[i])
    elif M[i] == '*':
        print(a[i]*b[i])
    else:
        print(a[i]//b[i])

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

Submission status: Accepted

Solution code:
import operator


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

Submission status: Accepted

Solution code:
while True:
    a, op, b = [x for x in input().split()]
    a, b = int(a), int(b)

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

Submission status: Accepted

Solution code:
while True:
         a,b,c= map(str,input().split())
         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))
         else:
                  break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = []
while True:
    string = input()
    if string.count("?") == 1:
        break
    ans.append(string)
for i in ans:
    print(int(eval(i)))

Submission status: Accepted

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

Submission status: Accepted

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

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, 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))

Submission status: Accepted

Solution code:
import math
a, op, b = map(str, input().split())
while op != "?":
    print(math.floor(eval(a+op+b)))
    a, op, b = map(str, input().split())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()
    if op == '?':
        break
    
    if op == '/':
        op = '//'
        
    print(eval(f'{a}{op}{b}'))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
while 1:
    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)
    elif op=='/':
        print(int(a/b))

Submission status: Accepted

Solution code:
def cul(A,OP,B):
    A = int(A)
    B = int(B)
    if OP == '+':
        return A+B
    elif OP == '-':
        return A-B
    elif OP == '*':
        return A*B
    else:
        return A//B
a,op,b = input().split()
while op != '?':
    print(cul(a,op,b))
    a,op,b = input().split()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
answer = []

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

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

    answer.append(result)

[print(answer[i]) for i in range(len(answer))]

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a,o,b = [i for i in input().split()]
    
    if o == '?':
        break
    elif o == '+':
        print(int(a)+int(b))
    elif o == '-':
        print(int(a)-int(b))
    elif o == '*':
        print(int(a)*int(b))
    else:
        print(int(a)//int(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for _ in range(20000):
    a, op, b = input().split()
    if op == '+':
        print(str(int(a) + int(b)))
    elif op == '-':
        print(str(int(a) - int(b)))
    elif op == '*':
        print(str(int(a) * int(b)))
    elif op == '/':
        print(str(int(a) // int(b)))
    elif op == '?':
        break

Submission status: Accepted

Solution code:
result = list()

while True:
    data = list(input().split())
    if data[1] == "+":
        result.append(int(data[0]) + int(data[2]))
    elif data[1] == "-":
        result.append(int(data[0]) - int(data[2]))
    elif data[1] == "*":
        result.append(int(data[0]) * int(data[2]))
    elif data[1] == "/":
        result.append(int(data[0]) // int(data[2]))
    elif data[1] == "?":
        break
    else:
        continue

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
while(1):
    a,op,b=input().split()
    if op=='?':
        break;
    else:
        print(math.floor(eval(a+op+b)))

Submission status: Accepted

Solution code:
import sys
import itertools
import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

while 1:
    a, op, b = readline().decode('utf8').split()
    a=int(a)
    b=int(b)
    if op=='?':
        break
    else:
        if op=='+':
            print(a+b)
        elif op=='-':
            print(a-b)
        elif op=='*':
            print(a*b)
        else:
            print(a//b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
while(True):
    a,op,b=input().split()
    if op=='?':
        break
    else:
        print(math.floor(eval("%d%s%d"%(int(a),op,int(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)
  elif op=='/':
      print(a//b)

Submission status: Accepted

Solution code:
for _ in range(20000):
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a//b)
    else:
        break

Submission status: Accepted

Solution code:
li = []
while True:
    li.append(input().split())
    if li[-1][1] == '?':
        break
for s in li:
    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(s[0]) // int(s[2]))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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:
ans = 0
for x in range(30):    
    a, op, b = input().split()
    if op == "+":
      ans = int(a) + int(b)
      print(str(ans))
    elif op == "-":
      ans = int(a) - int(b)
      print(str(ans))
    elif op == "*":
      ans = int(a) * int(b)
      print(str(ans))
    elif op == "/":
      ans = int(a) / int(b)
      print(str(int(ans)))
    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 == "+":
    answer = a + b
  elif op == "-":
    answer = a - b
  elif op == "*":
    answer = a * b
  elif op == "/":
    answer = a / b

  print(int(answer))

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

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

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:
    expr = input()
    if "?" in expr:
        break
    if "/" in expr:
        a, op, b = expr.split()
        print(int(a) // int(b))
    else:
        print(eval(expr))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

    if op == "?":
        break

    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:
while True:
    a, op, b = input().split()
    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
    else:
        break
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def operate(op_str, a, b):
    if op_str == '+':
        return a + b
    elif op_str == '-':
        return a - b
    elif op_str == '*':
        return int(a * b)
    elif op_str == '/':
        return int(a / b)

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

Submission status: Accepted

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

k = 0
while k == 0:
    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:
        k = 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while True :
    x, op, y = input().split()
    x, y = int(x), int(y)
    if op=="?" :
        break
    if op=="+" :
        print( x+y)
    elif op=="-" :
        print( x-y)
    elif op=="*" :
        print(x*y)
    elif op=="/" :
        print(x//y)
#    op(x, op, y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
while True:
    a, op, b = input().split()  # この時点では変数はstr型
    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(math.floor(int(a)/int(b)))

Submission status: Accepted

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