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

Submission status: Accepted

Solution code:
while True:
    a, op, b = input().split()
    a, 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:
a, op, b = [x for x in input().split()]
while (op != '?') :
    if op == '+':
        print(int(a) + int(b))
    elif op == '-':
        print(int(a) - int(b))
    elif op == '*':
        print(int(a) * int(b))
    elif op == '/' and b != '0':
        print(int(a) // int(b))
    a, op, b = [x for x in input().split()]

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def add(lhs: int, rhs: int) -> int:
    return lhs + rhs


def sub(lhs: int, rhs: int) -> int:
    return lhs - rhs


def multiply(lhs: int, rhs: int) -> int:
    return lhs * rhs


def divide(lhs: int, rhs: int) -> int:
    return int(lhs / rhs)


op_map = {'+': add, '-': sub, '*': multiply, '/': divide}

while True:
    in_str = input()
    a, op, b = in_str.split()
    if op == '?':
        exit()
    a = int(a)
    b = int(b)
    ans = op_map[op](a, b)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
for i in range(10**9+7) :
    a,op,b = map(str,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(math.floor((a/b)))

Submission status: Accepted

Solution code:
# coding: utf-8
# coding: Shift_JIS
# coding: EUC-JP
# coding: cp932
import math
while 1:
    a,b,c = map(str,input().split())
    a = int(a)
    c = int(c)
    ans = 0
    if b == "?":
        break
    if b == "+":
        ans = a + c
    if b == "-":
        ans = a - c
    if b == "/":
        ans = int(a / c)
    if b == "*":
        ans = a * c
    print(ans)

Submission status: Accepted

Solution code:
while True:
    t = input().split()
    a = int(t[0])
    op = t[1]
    b = int(t[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 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))
    else:
        print('%d' %(int(a) // int(b)))

Submission status: Accepted

Solution code:
import sys
import operator

for line in sys.stdin:
    a, op, b = line.strip().split()

    if op == '?':
        break

    a, b = map(int, [a, b])
    op = {
        '+': operator.add,
        '-': operator.sub,
        '*': operator.mul,
        '/': operator.floordiv
    }[op]

    print(op(a, b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a,op,b = [i for i in 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(20001):
    a=input()
    if "?"in a:break
    print(int(eval(a)))

Submission status: Accepted

Solution code:
while True:
    line = input()
    if line.find('?') != -1:
        break
    line = line.replace('/','//')
    exec('print('+line+')')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def wa(a,b,output):
    output=a+b
    return output

def sa(a,b,output):
    output=a-b
    return output

def seki(a,b,output):
    output=a*b
    return output

def syou(a,b,output):
    output=a//b
    return output

num=list(map(str,input().split()))
out=[]
while num[1]!="?":
    output=0
    a=int(num[0])
    b=int(num[2])

    if num[1]=="+":
        output=wa(a,b,output)
    elif num[1]=="-":
        output=sa(a,b,output)
    elif num[1]=="*":
        output=seki(a,b,output)
    elif num[1]=="/":
        output=syou(a,b,output)
    out.append(output)
    num=list(map(str,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
for i in range(sys.maxsize):
    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)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = 0
b = 0
op = "+"
ans = 0
while op != "?":
    z = input()
    a,op,b = [str(x) for x in z.split()]
    a = int(a)
    b = int(b)
    if op == "+":
        ans = a + b
        print (str(ans))
    elif op == "-":
        ans = a - b
        print (str(ans))
    elif op == "*":
        ans = a * b
        print (str(ans))
    elif op == "/":
        ans = a // b
        print (str(ans))

Submission status: Accepted

Solution code:
while True:
    try:
     (a,b,c)  =  map(str,input().split())
    except:
     exit
    if ( b == "?"):
        break

    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)

Submission status: Accepted

Solution code:
alist = []
oplist = []
blist = []

while(1):
    a, op, b = map(str, input().split())

    if op == "?":
        break

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

    alist.append(a)
    oplist.append(op)
    blist.append(b)

for a, op, b in zip(alist, oplist, blist):
    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=map(str,input().split())
    n1=int(a)
    n2=int(c)
    if b=="+":
        r=n1+n2
    elif b=="-":
        r=n1-n2
    elif b=="*":
        r=n1*n2
    elif b=="/":
        r=n1//n2
    else:
        break
    print(r)

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

Submission status: Accepted

Solution code:
while True:
    a,b,c = input().split()
    if b == '?':
        break
    else:
        print(round(eval(a+b+c)-0.4))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    input_state = input()
    if input_state == "?":
        break
    else:
        ans = []
        (a, op, b) = map(str, input_state.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 = int(int(a)/int(b))
        else:
            break
        print("{0}".format(int(ans)))

Submission status: Accepted

Solution code:
while(1):
    x,op,y=input().split()
    X=int(x)
    Y=int(y)
    if(op=='+'):
      print(X+Y)
    elif(op=='-'):
      print(X-Y)
    elif(op=='*'):
      print(X*Y)
    elif(op=='/'):
      print(X//Y)
    else:
        break

Submission status: Accepted

Solution code:
while True:
	a,b,c = [i for i in 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 == "?":
        break
    elif op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)
    elif op == "%":
        print(a % b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

li = []
while True:
    a = input()
    if "?" in a:
        break
    li.append(a)

for i in li:
    i = eval(i)
    print(math.floor(i))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


while True:
    s=input()
    if '?' in s:
        break
    
    print(int(eval(s)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_array = input().split()
result = []
while (len(input_array) >=3 and input_array[1] != '?'):
    op = input_array[1]
    a = int(input_array[0])
    b = int(input_array[2])
    if (op == '+'):
        result.append(a + b) 
    elif (op == '-'):
        result.append(a - b) 
    elif (op == '*'):
        result.append(a * b)
    else:
        result.append(a // b) 
    input_array = input().split()

for i in result:
    print(i)

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()
    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:
a, op, b = input().split()
while op != "?":
    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)
    a, op, b = input().split()

Submission status: Accepted

Solution code:
# coding:utf-8
while 1:
    nn,s,mm=map(str,input().split())
    n=int(nn)
    m=int(mm)
    if s=='+':
        print(n+m)
    elif s=='-':
        print(n-m)
    elif s=='*':
        print(n*m)
    elif s=="/":
        print(n//m)
    else:
        break

Submission status: Accepted

Solution code:
L = []
while True:
    a, b, c = map(str, input().split(" "))
    k = [a, b, c]
    if b == "?":
        break


    L.append(k)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list = []
while True:
    try:
        list = input().strip().split()
        if list[1] == "?":
            break
        a, op, b = int(list[0]), list[1], int(list[2])
        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:
import math
results = []
while True:
    inputs = input().split()
    a = int(inputs[0])
    ope = inputs[1]
    b = int(inputs[2])
    result = None
    if ope == '?':
        break
    elif ope == '+':
        result = a + b
    elif ope == '-':
        result = a - b
    elif ope == '*':
        result = a * b
    elif ope == '/':
        result = math.floor(a / b)
    results.append(result)

for result in results:
    print(result)

Submission status: Accepted

Solution code:
while 1:
 try:print eval(raw_input())
 except:exit()

Submission status: Accepted

Solution code:
import sys
input_lines = sys.stdin.readlines()
for input_ in input_lines:
    input_ = input_.split()
    a, op, b = int(input_[0]), input_[1], int(input_[2])
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a//b)
    else:
        break

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
sss = input().split(' ')
while not sss[1] == '?':
	a = int(sss[0])
	b = int(sss[2])
	op = sss[1]
	if op == '+': ans = a + b
	elif op == '-': ans = a - b
	elif op == '*': ans = a * b
	elif op == '/': ans = a // b
	print('{0}'.format(ans))
	sss = input().split(' ')

Submission status: Accepted

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

import math

def main():

	while True:
		a,op,b = raw_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

if __name__ == "__main__":

	main()

Submission status: Accepted

Solution code:
data = []
output = []
for x in range(0,10000):
    data = input().split()
    if data[1] == '?':
        break
    elif data[1] == '+' :
        output.append(int(data[0]) + int(data[2]))
    elif data[1] == '-' :
        output.append(int(data[0]) - int(data[2]))
    elif data[1] == '*' :
        output.append(int(data[0]) * int(data[2]))
    else:
        output.append(int(data[0]) // int(data[2]))
    data.clear()
for x in range(0,len(output)):
    print(output[x])

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include <iostream>

using namespace std;

int main()
{
 int a, b;
 int result[1001];
 char op;
 int i = 0;
 while(scanf("%d %c %d", &a, &op, &b), op!='?')
 {
  switch(op)
  {
   case '+':
    result[i++] = a + b;
    break;
   case '-':
    result[i++] = a - b;
    break;
   case '*':
    result[i++] = a * b;
    break;
   case '/':
    result[i++] = a / b;
    break;
   default:
    break;
  }
 }
 for (int j = 0; j < i; j++)
 {
  cout << result[j] << endl;
 }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
while True:
    table = map(int,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: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
while True:
    s=input().split()
    if s[1]==?:
        break
    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]))
    elif s[1]==/:
        print(math.floor(int(s[0])/int(s[2])))

Submission status: Runtime Error

Solution code:
import math
while True:
    s=input().split()
    if s[0]==0:
        break
    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]))
    elif s[1]==/:
        print(math.floor(int(s[0])/int(s[2])))

Submission status: Runtime Error

Solution code:
import math
while True:
    s=input().split()
    if s[0]=="?":
        break
    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]))
    elif s[1]=="/":
        print(math.floor(int(s[0])/int(s[2])))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
while True:
    a = int(input())
    c = str(input())
    b = int(input())
    if(c == '+'):
        print(a + b)
    elif(c == '-'):
        print(a - b)
    elif(c == '*'):
        print(a * b)
    elif(c == '/')
        print(a / b)
    else:
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = [s.strip().replace("/","//") for s in open(0).readlines()][:-1]
print(*map(eval, S), sep='\n')

Submission status: Runtime Error

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: Runtime Error

Solution code:
while(True):  
    a=int(input())
    op=char(input())
    b=int(input())
    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: Runtime Error

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