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

Submission status: Accepted

Solution code:
while 1:
	a, op, b = map(str, raw_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:
def solve(a, op, b):
    if op == '+':
        return a + b
    elif op == '-':
        return a - b
    elif op == '*':
        return a * b
    elif op == '/':
        return a // b
    return None

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

Submission status: Accepted

Solution code:
#coding:utf-8
#1_4_C 2015.3.29
while True:
    data = input().split()
    if data[1] == '?':
        break
    elif data[1] == '+':
        print(int(data[0]) + int(data[2]))
    elif data[1] == '-':
        print(int(data[0]) - int(data[2]))
    elif data[1] == '*':
       print(int(data[0]) * int(data[2]))
    elif data[1] == '/':
       print(int(data[0]) // int(data[2]))

Submission status: Accepted

Solution code:
#coding:utf-8
#1_4_C 2015.3.29
while True:
    data = input().split()
    if data[1] == '?':
        break
    elif data[1] == '+':
        print(int(data[0]) + int(data[2]))
    elif data[1] == '-':
        print(int(data[0]) - int(data[2]))
    elif data[1] == '*':
        print(int(data[0]) * int(data[2]))
    elif data[1] == '/':
        print(int(data[0]) // int(data[2]))

Submission status: Accepted

Solution code:
#coding:utf-8
#1_4_C 2015.3.29
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Submission status: Accepted

Solution code:
import sys

while True:
	a, op, b = sys.stdin.readline().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:
import sys

while True:
	a, op, b = sys.stdin.readline().split( " " )
	if "?" == op:
		break
	a, b = int( a ), 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:
	a,b,c=map(str, input().split())
	if b=='?':
		break
	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)

Submission status: Accepted

Solution code:
while 1:
	a, op, b = map(str, raw_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=[int(i) for i in (a,b)]
	if op=="?":
		break
	print(a+b if op=="+" else a-b if op=="-" else a*b if op=="*" else int(a/b) if op=="/" else "")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:UTF-8

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    flag = True
    while flag:
        s1, tr, s2 = input().split()
        s1, s2 = int(s1), int(s2)
        if tr == "+":
            print(s1 + s2)
        elif tr == "-":
            print(s1 - s2)
        elif tr == "*":
            print(s1 * s2)
        elif tr == "/":
            print(s1 // s2)
        else:
            flag = False
            break


if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
# coding=utf-8
while True:
    a, op, b = raw_input().rstrip().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:
if __name__ == "__main__":

    while True:
        s = raw_input().split()
        a = int(s[0])
        b = int(s[2])
        op = s[1];

        if op == "*":
            x = a * b
        elif op == "+":
            x = a + b
        elif op == "-":
            x = a - b
        elif op == "/":
            x = a / b
        elif op == "?":
            break;
        print x

Submission status: Accepted

Solution code:
def cal(a, op, b):

  if op == '+':
    r = a + b
  elif op == '-':
    r = a - b
  elif op == '*':
    r = a * b
  else:
    r = a / b
  return r

while 1:
  a,op,b = raw_input().split()
  if op == '?':
    break
  else:
    print(cal(int(a), op, int(b)))

Submission status: Accepted

Solution code:
def cal(a, op, b):

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

while 1:
  a,op,b = raw_input().split()
  if op == '?':
    break
  else:
    print(cal(int(a), op, int(b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in 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)

Submission status: Accepted

Solution code:
def calc(a, op, b):
    if op == "+":
        r = a + b
    elif op == "-":
        r = a - b
    elif op == "*":
        r = a * b
    else:
        r = a / b
    return r
 
while True:
    a, op , b = raw_input().split()
    if op == "?":
        break
    print(calc(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
    elif op == '+':
        print(a + b)
        pass
    elif op == '-':
        print(a - b)
        pass
    elif op == '*':
        print(a * b)
        pass
    else:
        print(a // b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True :
    (a, op, b) = [int(i) if i.isdigit() else i for i in 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)

Submission status: Accepted

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

    if op == '?':
        break
    elif op == '+':
        print( '{0}'.format( a + b))
    elif op == '-':
        print( '{0}'.format( a - b))
    elif op == '*':
        print( '{0}'.format( a * b))
    elif op == '/':
        print( '{0}'.format( a // b))

Submission status: Accepted

Solution code:
def calc(a,op,b):
    if op == "+":
        r = a + b 
    if op == "-":
        r = a - b 
    if op == "*":
        r = a * b 
    if op == "/":
        r = a // b
    return r

if __name__ == '__main__':
    while True:
        a,op,b = input().split()
        if op == "?":
            break
        print(calc(int(a),op,int(b)))

Submission status: Accepted

Solution code:
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in 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)

Submission status: Accepted

Solution code:
def calc(a,op,b):
    if op == "+":
        r = a + b 
    if op == "-":
        r = a - b 
    if op == "*":
        r = a * b 
    if op == "/":
        r = a // b
    return r
 
if __name__ == '__main__':
    while True:
        a,op,b = input().split()
        if op == "?":
            break
        print(calc(int(a),op,int(b)))

Submission status: Accepted

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

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        i = a * b
        print(a * b)

    if op == '/':
        print(a // b)

Submission status: Accepted

Solution code:
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in 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)
    else :
        break

Submission status: Accepted

Solution code:
import warnings


data = 1

i = 0

while (i == 0):
    temp = raw_input().split()

    if (temp[1] == '+'):
        data = int(temp[0]) + int(temp[2])
        print data
    elif (temp[1] == '-'):
        data = int(temp[0]) - int(temp[2])
        print data
    elif (temp[1] == '*'):
        data = int(temp[0]) * int(temp[2])
        print data
    elif (temp[1] == '/'):
        data = int(temp[0]) / int(temp[2])
        print data
    else:
        break

Submission status: Accepted

Solution code:
ans = []
while True:
  arr = map(str, raw_input().split())
  if arr[1] is '?':
    break

  val = eval(arr[0] + arr[1] + arr[2])
  ans.append(val)

print("\n".join(map(str, ans)))

Submission status: Accepted

Solution code:
op = ""

while op != "?":
  input = raw_input().split(" ")

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

  result = 0
  if op == "+":
    result = a + b
  elif op == "-":
    result = a - b
  elif op == "*":
    result = a * b
  elif op == "/":
    result = a / b
  else:
    break

  print "%d" % result

Submission status: Accepted

Solution code:
while True:
    data = input()
    if '?' in data:
        break
    print(eval(data.replace('/','//')))

Submission status: Accepted

Solution code:
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in 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)

Submission status: Accepted

Solution code:
while True:
    a = input()
    if '?' in a:
        break
    print(eval(a.replace("/", "//")))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in 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)

Submission status: Accepted

Solution code:
while True :
    (a, op, b) = [int(i) if i.isdigit() else i for i in 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)

Submission status: Accepted

Solution code:
from itertools import takewhile
(lambda *_: None)(*map(print,
                       map(eval,
                           map(lambda s: s.replace('/', '//'),
                               takewhile(lambda s: '?' not in s,
                                         iter(input, ''))))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = raw_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)
        elif op == '/':
            print int(a) / int(b)
        else:
            print "error"

Submission status: Accepted

Solution code:
import sys

for x in sys.stdin:
    if "?" in x:
        break
    print(eval(x.replace("/", "//")))

Submission status: Accepted

Solution code:
a = []
while True:
    b = raw_input().split()
    if b[1] == '?':
        break
    c = [int(b[0]), b[1], int(b[2])]
    a.append(c)
for list in a:
    x, op, y = list
    if op == '+':
        print x + y
    elif op == '-':
        print x - y
    elif op == '*':
        print x * y
    else:
        print x / y

Submission status: Accepted

Solution code:
while True:
    s = raw_input().split()
    a = int(s[0])
    op = s[1]
    b = int(s[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:
def add(x,y):
    return x + y
def sub(x,y):
    return x - y
def mul(x,y):
    return x * y
def mod(x,y):
    return x / y



x = []
a = []
while True:
    x = raw_input().split()
    if x[1]=='?':
        break
    if x[1]=='+':
        y = add(int(x[0]),int(x[2]))
    if x[1]=='-':
        y = sub(int(x[0]),int(x[2]))
    if x[1]=='*':
        y = mul(int(x[0]),int(x[2]))
    if x[1]=='/':
        y = mod(int(x[0]),int(x[2]))
    a.append(y)

    
for j in range(len(a)):
    print a[j]

Submission status: Accepted

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

	if x[1] == '+' :
		print a + b
	elif x[1] == '-' :
		print a - b
	elif x[1] == '*' :
		print  a * b 
	elif x[1] == '/' :
		print a / b
	elif x[1] == '?' :
		break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, op, b = raw_input().split()
    a, b = map(int,[a,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:
# encoding:utf-8

while True:
	a, op, b = raw_input().split()
	if op == "?":
		break
	a, b = map(int, (a,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:
	a,b,c = map(str,raw_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 1:
  l=raw_input()
  if l.find("?")==-1:
    print eval(l)
  else: 
    break

Submission status: Accepted

Solution code:
while True:

	a, op, b = [int(i) if i.isdigit() else i for i in input().split()]

	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:
l = []
while True:
  a,op,b = input().split()
  if op == '?':
    break
  A = int(a)
  B = int(b)
  if op == '+':
    l.append(A+B)
  elif op == '-':
    l.append(A-B)
  elif op == '*':
    l.append(A*B)
  elif op == '/':
    l.append(A//B)
for i in l:
  print(i)

Submission status: Accepted

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

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:
import re
while True:
    s = input()
    if (re.match(r'.+\s\?\s.+', s)):
        break
    print(int(eval(s)))

Submission status: Accepted

Solution code:
import sys

for v in iter(sys.stdin.readline,""):
    a,op,b = v.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:
#-------------------------------------------------------------------------------
# coding: utf-8
# Created:     16/12/2015
import sys

io = sys.stdin

op = { "+" : lambda x, y:  x + y,
        "-": lambda x,y: x - y,
        "/": lambda x,y: x/y,
        "*": lambda x,y: x*y }


while True:
    a, op_, b = io.readline().split()
    if op_ == "?" : break
    a1, b1 = int(a), int(b)

    print op[op_](a1, b1)

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

Submission status: Accepted

Solution code:
import sys

for stdin in sys.stdin:
    inlist = stdin.split()

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

Submission status: Accepted

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

Submission status: Accepted

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

import math

op = "init"
ans = []

while (op != "?"):
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if (op == '+'):
        ans.append(a + b)
    elif (op == '-'):
        ans.append(a - b)
    elif (op == '*'):
        ans.append(a * b)
    elif (op == "/"):
        ans.append(int(a / b))

for answer in ans:
    print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = 0
while n != 1:
 m = raw_input().split()
 if m[1] == "?":
     break

 if m[1] == "+":
     print int(m[0])+int(m[2])
 if m[1] == "-":
     print int(m[0])-int(m[2])
 if m[1] == "*":
     print int(m[0])*int(m[2])
 if m[1] == "/":
     print int(m[0])/int(m[2])

Submission status: Accepted

Solution code:
while True:
    line = raw_input().split()
    a = int(line[0])
    op = str(line[1])
    b = int(line[2])
    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 1:
  a,op,b=raw_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:
while 1 > 0:
    formula = raw_input()
    a, op, b = formula.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:
 x = raw_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 = map(str,raw_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:
    Input = raw_input().split()

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

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

Submission status: Accepted

Solution code:
while(1):
  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)
  elif op == "?":
    break

Submission status: Accepted

Solution code:
while 1:
  s = raw_input().split()
  a, b =int(s[0]), int(s[2])
  op = s[1] 

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

Submission status: Accepted

Solution code:
while True:
  s = raw_input().split()
  a = int(s[0])
  op = s[1]
  b = int(s[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:
ans = []

while True:
  cin = raw_input().split()
  a = int(cin[0])
  b = int(cin[2])
  if cin[1] == "+":
    ans.append(a + b)
  elif cin[1] == "-":
    ans.append(a - b)
  elif cin[1] == "*":
    ans.append(a * b)
  elif cin[1] == "/":
    ans.append(a // b)
  elif cin[1] == "?":
    break

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

Submission status: Accepted

Solution code:
while 1:
   a, op, b = raw_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 1 :
    a, op, b= raw_input().split()
    c = int(a)
    d = int(b)
    if op == '?': break
    elif op == '+': print c + d
    elif op == '-': print c - d
    elif op == '*': print c * d
    elif op == '/': print c / d

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
  a,op,b = raw_input().split()
  a,b = map(int,[a,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:
    entry = map(str, raw_input().split())
    a  = int(entry[0])
    op = entry[1]
    b  = int(entry[2])
    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 = raw_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 = [x for x in input().split()]
    a, b = int(a), int(b)
    if op == "?":
        break
    elif 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 1:
    a , op, b = raw_input().split()
    a = int(a)
    op = str(op)
    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=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:
a = raw_input().split()
while a[1] != '?':
	print eval(a[0]+a[1]+a[2])
	a = raw_input().split()

Submission status: Accepted

Solution code:
while 1:

  str = raw_input().split()
  a = int(str[0])
  op = str[1]
  b = int(str[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:
while(True):
    (a,op,b) = [s for s 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)
    else:
        break

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p == 0: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def add(x, y):
    return x+y

def diff(x, y):
    return x-y
    
def mul(x, y):
    return x*y
    
def div(x, y):
    return int(x/y)

op = {"+" : add , "-" : diff, "*" : mul, "/" : div}

st = input()
s = st.split()
while(not s[1] == '?'):
    print(op[s[1]](int(s[0]), int(s[2])))
    st = input()
    s = st.split()

Submission status: Accepted

Solution code:

while True :
    a,op,b = map(str,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
    elif op == "?":
        break

Submission status: Accepted

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