submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s153393870 | p00109 | Wrong Answer | import re
class c(int):
def __add__(self,n):
return c(int(self)+int(n))
def __sub__(self,n):
return c(int(self)-int(n))
def __mul__(self,n):
return c(int(self)*int(n))
def __floordiv__(self,n):
return c(int(self)//int(n))
for _ in range(int(input())):
f = input().rep... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s183094301 | p00109 | Wrong Answer | import re
class c(int):
def __add__(self,n):
return c(int(self)+int(n))
def __sub__(self,n):
return c(int(self)-int(n))
def __mul__(self,n):
return c(int(self)*int(n))
def __truediv__(self,n):
return c(int(self)//int(n))
for _ in range(int(input())):
print(eval(re.s... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s600109507 | p00109 | Wrong Answer | import re
class c:
def __str__(self):
return str(self.x)
def __init__(self,n):
self.x=n
def __add__(self,n):
return c(self.x+n.x)
def __sub__(self,n):
return c(self.x-n.x)
def __mul__(self,n):
return c(self.x*n.x)
def __truediv__(self,n):
return c(... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s504237842 | p00109 | Wrong Answer | n = int(input())
for _ in range(n):
print(eval(input()[:-1])) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s776169795 | p00109 | Wrong Answer | n = int(input())
for _ in range(n):
print(int(eval(input()[:-1]))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s125203220 | p00109 | Wrong Answer | for _ in range(int(input())):
print(eval(input().replace('/', '//')[:-1])) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s102615026 | p00109 | Wrong Answer | for _ in range(int(input())):
ans = eval(input().replace('/', '//')[:-1])
print(str(ans)) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s251985556 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
n = int(input())
for i in range(n):
command = input().strip()
command = command.replace('=', '')
print(eval(command)) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s754936591 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
n = int(input())
for i in range(n):
command = input().strip()
command = command.replace('=', '')
command = command.replace('/', '//')
print(eval(command)) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s282433352 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
n = int(input())
for i in range(n):
command = input().strip()
command = command.replace('=', '')
command = command.replace('/', '//')
print(command)
print(int(eval(command))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s931030382 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
n = int(input())
for i in range(n):
command = input().strip()
command = command.replace('=', '')
command = command.replace('/', '//')
#print(command)
print(int(eval(command))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s644389955 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
import math
import re
class Num:
def __str__(self):
return str(self.x)
def __init__(self, value):
self.x = value
def __add__(self,value):
return Num(self.x + value.x)
def __sub__(self, value):
return Num(self.x - value.x)
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s331841215 | p00109 | Wrong Answer | for _ in range(int(input())):
e = input()[:-1].replace("/", "//")
print(eval(e)) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s306326742 | p00109 | Wrong Answer | for _ in range(int(input())):
print(eval(input()[:-1].replace('/', '//'))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s510383266 | p00109 | Wrong Answer | for _ in range(int(input())):
print(int(eval(input()[:-1].replace('/', '//')))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s514068260 | p00109 | Wrong Answer | num = int(raw_input())
for i in range(num):
input_line = raw_input()
eval_line = input_line[0:-1]
result = eval(eval_line)
print result | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s600225468 | p00109 | Wrong Answer | #n=int(input())
def lastfind(s,x):
n=len(s)
s_rev=s[::-1]
t=s_rev.find(x)
return n-t-1
def doublefind(s,x,y):
if x in s:
p=s.find(x)
else:
p=len(s)+10
if y in s:
q=s.find(y)
else:
q=len(s)+10
if p<=q and p<len(s)+5:
return [p,x]
elif ... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s344949189 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0109&lang=jp
"""
import sys
def solve(exp):
exp = exp.replace('=', '')
exp = exp.replace('/', '//')
return eval(exp)
def main(args):
n = int(input())
for _ in range(n):
expression = input()
resu... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s900898919 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0109&lang=jp
"""
import sys
def solve(exp):
exp = exp.replace('=', '')
exp = exp.replace('/', '//')
return eval(exp)
def main(args):
n = int(input())
for _ in range(n):
expression = input().strip()
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s022091016 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0109&lang=jp
"""
import sys
def solve(exp):
exp = exp.replace('=', '')
#exp = exp.replace('/', '//')
return int(eval(exp))
def main(args):
n = int(input())
for _ in range(n):
expression = input().strip()... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s783759225 | p00109 | Wrong Answer | # coding: utf-8
# ???????????????????¨?????????°???????????????????????????????????????????????????
def RPN_cul(L):
St = []
for i in L:
if i == '+':
St.append(int(St.pop()) + int(St.pop()))
elif i == '-':
St.append(-int(St.pop()) + int(St.pop()))
elif i == '*':
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s051650361 | p00109 | Wrong Answer | def RPN_cul(L):
St = []
for i in L:
if i == '+':
St.append(int(St.pop()) + int(St.pop()))
elif i == '-':
St.append(-int(St.pop()) + int(St.pop()))
elif i == '*':
St.append(int(St.pop()) * int(St.pop()))
elif i == '/':
a = int(St.po... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s708604561 | p00109 | Wrong Answer | def RPN_cul(L):
St = []
for i in L:
if i == '+':
St.append(int(St.pop()) + float(St.pop()))
elif i == '-':
St.append(-int(St.pop()) + float(St.pop()))
elif i == '*':
St.append(int(St.pop()) * float(St.pop()))
elif i == '/':
a = int... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s671972776 | p00109 | Wrong Answer | # coding: utf-8
# ???????????????????¨?????????°???????????????????????????????????????????????????
def RPN_cul(L):
St = []
for i in L:
if i == '+':
St.append(int(St.pop()) + float(St.pop()))
elif i == '-':
St.append(-int(St.pop()) + float(St.pop()))
elif i == '... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s103772541 | p00109 | Wrong Answer | def String2List(s):
L = []
flag = True
l = len(s)
for i in range(l):
if s[i].isdigit() and flag:
t = ""
j = 0
while s[i+j].isdigit():
t += s[i+j]
if i+j == l-1:
break
j += 1
L.appe... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s645713589 | p00109 | Wrong Answer | def String2List(s):
L = []
flag = True
l = len(s)
for i in range(l):
if s[i].isdigit() and flag:
t = ""
j = 0
while s[i+j].isdigit():
t += s[i+j]
if i+j == l-1:
break
j += 1
L.appe... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s004034582 | p00109 | Wrong Answer | def String2List(s):
L = []
flag = True
l = len(s)
for i in range(l):
if s[i].isdigit() and flag:
t = ""
j = 0
while s[i+j].isdigit():
t += s[i+j]
if i+j == l-1:
break
j += 1
L.appe... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s160257076 | p00109 | Wrong Answer | # coding: utf-8
# ??????????????????????????????????????¬??§?????°???????????????????????????????????????
def String2List(s):
L = []
flag = True
l = len(s)
for i in range(l):
if s[i].isdigit() and flag:
t = ""
j = 0
while s[i+j].isdigit():
t +... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s934237805 | p00109 | Wrong Answer | # coding: utf-8
# ??????????????????????????????????????¬??§?????°???????????????????????????????????????
def String2List(s):
L = []
flag = True
l = len(s)
for i in range(l):
if s[i].isdigit() and flag:
t = ""
j = 0
while s[i+j].isdigit():
t +... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s585926956 | p00109 | Wrong Answer | # coding: utf-8
# Convert String to List
def String2List(s):
L = []
flag = True
l = len(s)
for i in range(l):
if s[i].isdigit() and flag:
t = ""
j = 0
while s[i+j].isdigit():
t += s[i+j]
if i+j == l-1:
break... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s595595532 | p00109 | Wrong Answer | # Aizu Problem 0109: Smart Calculator
#
import sys, math, os
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
N = int(input())
for _ in range(N):
print(eval(input().replace('=', ''))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s642256904 | p00109 | Wrong Answer | # Aizu Problem 0109: Smart Calculator
#
import sys, math, os
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
N = int(input())
for _ in range(N):
print(eval(input().replace('=', '').replace('/', '//'))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s702781400 | p00109 | Wrong Answer | import re
n = int(input())
for i in range(n):
eq = input()
meq = re.sub(r'([\d*]+)/(\d+)',r'(\1//\2)', eq)
print(eval(meq.replace("=",""))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s855957823 | p00109 | Wrong Answer | n = int(input())
for _ in range (n):
print(eval(input().rstrip('='))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s283868426 | p00109 | Wrong Answer | n = int(input())
for _ in range (n):
print(eval(input().rstrip('=').replace('/','//'))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s640356582 | p00109 | Wrong Answer | import sys
#from me.io import dup_file_stdin
#@dup_file_stdin
def solve():
for _ in range(int(sys.stdin.readline())):
print(eval(sys.stdin.readline()[:-2].replace(r"/",r"//")))
solve() | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s245995210 | p00109 | Wrong Answer | import sys
#from me.io import dup_file_stdin
#@dup_file_stdin
def solve():
for _ in range(int(sys.stdin.readline())):
print(eval(sys.stdin.readline()[:-2]))
solve()
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s853121601 | p00109 | Wrong Answer | import sys
#from me.io import dup_file_stdin
#@dup_file_stdin
def solve():
for _ in range(int(sys.stdin.readline())):
print(eval(sys.stdin.readline()[:-1].strip("=").replace("/","//")))
solve() | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s052483800 | p00109 | Wrong Answer | import sys
import re
#from me.io import dup_file_stdin
#@dup_file_stdin
def solve():
for _ in range(int(sys.stdin.readline())):
expr = sys.stdin.readline()[:-1].strip("=")
expr = re.sub(".d+","",expr)
print(eval(expr.replace("/","//")))
solve() | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s909208376 | p00109 | Wrong Answer | import sys
import re
#from me.io import dup_file_stdin
#@dup_file_stdin
def solve():
for _ in range(int(sys.stdin.readline())):
expr = sys.stdin.readline()[:-1].strip("=")
expr = re.sub(r"\.\d+","",expr)
print(eval(expr.replace("/","//")))
solve() | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s157793796 | p00109 | Wrong Answer | # coding: utf-8
# Convert String to List
def String2List(s):
L = []; tmp = ""
for i in s:
if i.isdigit():
tmp += i
else:
if tmp != "":
L.append(tmp)
tmp = ""
L.append(i)
if tmp != "":
L.append(tmp)
return L
# ... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s343032895 | p00109 | Wrong Answer | import sys
#from me.io import dup_file_stdin
def prec(op):
if op in "+-":return 1
if op in "*/":return 2
raise NotImplementedError()
def postFix(expr):
stack = []
operators = []
num = 0
isdigit = False
for ch in expr:
if ch.isdigit():
isdigit = True
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s135625926 | p00109 | Wrong Answer | for _ in range(int(input())):
print(eval(input()[:-1]))
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s888899726 | p00109 | Wrong Answer | def ReversePolishNotation(string):
priority = {"Sentinel": 0, "(": 0, "+": 1, "-": 1, "*": 2, "/": 2}
stack = []
signStack = ["Sentinel"]
for item in string[:-1]:
if item == "(":
signStack.append(item)
elif item == ")":
while signStack[-1] != "(":
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s353215696 | p00109 | Wrong Answer | def ReversePolishNotation(string):
priority = {"Sentinel": 0, "(": 0, "+": 1, "-": 1, "*": 2, "/": 2}
stack = []
signStack = ["Sentinel"]
for item in string[:-1]:
if item == "(":
signStack.append(item)
elif item == ")":
while signStack[-1] != "(":
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s492771237 | p00109 | Wrong Answer | def ReversePolishNotation(string):
priority = {"Sentinel": 0, "(": 0, "+": 1, "-": 1, "*": 2, "/": 2}
stack = []
signStack = ["Sentinel"]
for item in string[:-1]:
if item == "(":
signStack.append(item)
elif item == ")":
while signStack[-1] != "(":
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s615908750 | p00109 | Wrong Answer | def ReversePolishNotation(string):
priority = {"Sentinel": 0, "(": 0, "+": 1, "-": 1, "*": 2, "/": 2}
stack = []
signStack = ["Sentinel"]
isContinue = False
for item in string[:-1]:
if str.isnumeric(item):
if not isContinue:
stack.append(item)
i... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s958123335 | p00109 | Wrong Answer | def ReversePolishNotation(string):
priority = {"Sentinel": 0, "(": 0, "+": 1, "-": 1, "*": 2, "/": 2}
stack = []
signStack = ["Sentinel"]
isContinue = False
for item in string[:-1]:
if str.isnumeric(item):
if not isContinue:
stack.append(item)
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s262085827 | p00109 | Wrong Answer | def ReversePolishNotation(string):
priority = {"Sentinel": 0, "(": 0, "+": 1, "-": 1, "*": 2, "/": 2}
stack = []
signStack = ["Sentinel"]
isContinue = False
for item in string[:-1]:
if str.isnumeric(item):
if not isContinue:
stack.append(item)
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s622708727 | p00109 | Wrong Answer | def ReversePolishNotation(string):
priority = {"(": 0, ")": 0, "+": 1, "-": 1, "*": 2, "/": 2}
stack = []
signStack = []
isContinue = False
for item in string[:-1]:
if str.isnumeric(item):
if not isContinue:
stack.append(item)
isContinue = True... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s006257522 | p00109 | Wrong Answer | for _ in[0]*int(input()):print(eval(input()[:-1]))
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s071773889 | p00109 | Wrong Answer | for _ in[0]*int(input()):print(int(eval(input()[:-1])))
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s724842390 | p00109 | Wrong Answer | for _ in[0]*int(input()):
L=[];t=''
for e in input()[:-1]:
if e.isdigit():t+=e
else:
if t:L+=[t];t=''
L+=e
if t:L+=t
P,S=[],[]
table={"*":2,"/":2,"+":1,"-":1,"(":0,")":0}
for i in L:
if i in'*/+-':
while S and table[S[-1]]>=table[i]:P+=S.pop()
S+=i
elif"("==i:S+=i
elif")"==i:
while"("!=S[... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s648234038 | p00109 | Wrong Answer | r={"*":2,"/":2,"+":1,"-":1,"(":0,")":0}
for _ in[0]*int(input()):
L=[];t=''
for e in input()[:-1]:
if e.isdigit():t+=e
else:
if t:L+=[t];t=''
L+=e
if t:L+=t
P,S=[],[]
for i in L:
if i in'*/+-':
while S and r[S[-1]]>=r[i]:P+=S.pop()
S+=i
elif"("==i:S+=i
elif")"==i:
while"("!=S[-1]:P+=S.pop(... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s451060243 | p00109 | Wrong Answer | R={"*":2,"/":2,"+":1,"-":1,"(":0,")":0}
for _ in[0]*int(input()):
L=[];t=''
for e in input()[:-1]:
if e.isdigit():t+=e
else:
if t:L+=[t];t=''
L+=e
if t:L+=[t]
P,S=[],[]
for i in L:
if"("==i:S+=i
elif")"==i:
while"("!=S[-1]:P+=S.pop()
S.pop()
elif i in R:
while S and R[S[-1]]>=R[i]:P+=S.pop... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s586157895 | p00109 | Wrong Answer | # In the name of Allah
for i in range(input()):
x=raw_input()[:-1]
print eval(x)
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s282113580 | p00109 | Wrong Answer | N = int(input())
for i in range(N):
print(int(eval(input().strip("="))))
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s797230481 | p00109 | Wrong Answer | N = int(input())
for i in range(N):
print(eval(input().strip("=")))
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s235594179 | p00109 | Wrong Answer | def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
N = int(input())
for l in range(N):
S = input()
if S == "exit":
break
S = S[0:len(S)-1]
print(eval(S))
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s930512666 | p00109 | Wrong Answer | [print(eval(input()[:-1])) for _ in range(int(input()))]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s642989819 | p00109 | Wrong Answer | n = int(raw_input())
for _ in range(n):
s = raw_input()
ans = eval(s[:-1])
print ans
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s323764589 | p00109 | Wrong Answer | [print(eval(input()[:-1])) for _ in range(int(input()))]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s585827356 | p00109 | Wrong Answer | [print(eval(input().replace("/","//")[:-1])) for _ in range(int(input()))]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s831225620 | p00109 | Wrong Answer | [print(int(eval(input()[:-1]))) for _ in range(int(input()))]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s670198575 | p00109 | Wrong Answer | [print(eval(input()[:-1])) for i in range(int(input()))]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s731003221 | p00109 | Wrong Answer | l=[eval(input()[:-1]) for i in range(int(input()))]
[print(i) for i in l]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s864340786 | p00109 | Wrong Answer | [print(int(eval(input()[:-1]))) for i in range(int(input()))]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s091808122 | p00109 | Wrong Answer | l=[eval(raw_input()[:-1]) for i in range(int(input()))]
for i in l:
print i
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s679905832 | p00109 | Wrong Answer | [print(eval(input()[:-1].replace("/","//"))) for i in range(int(input()))]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s834005574 | p00109 | Wrong Answer | r=[eval(input()[:-1].replace("/","//")) for i in range(int(input()))]
[print(i) for i in r]
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s329596143 | p00109 | Wrong Answer | import re
class o:
def __str__(self):
return str(self.x)
def __init__(self,value):
self.x=value
def __add__(self,value):
return o(self.x+value.x)
def __sub__(self,value):
return o(self.x-value.x)
def __mul__(self,value):
return o(self.x*value.x)
def __true... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s106982405 | p00109 | Wrong Answer | # AOJ 0109 Smart Calculator
# Python3 2018.6.18 bal4u
INF = 1000000010
LEFT = INF+1
RIGHT = INF+2
PLUS = INF+3
MINUS = INF+4
MUL = INF+5
DIV = INF+6
token = { '+':PLUS, '-':MINUS, '*':MUL, '/':DIV }
rank = { PLUS:2, MINUS:2, MUL:3, DIV:3, LEFT:1, RIGHT:1 }
S, top = [0]*200, 0
Q, end = [0]*200, 0
def getInt():
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s713040278 | p00109 | Wrong Answer | # AOJ 0109 Smart Calculator
# Python3 2018.6.18 bal4u
INF = 1000000010
LEFT = INF+1
RIGHT = INF+2
PLUS = INF+3
MINUS = INF+4
MUL = INF+5
DIV = INF+6
token = { '+':PLUS, '-':MINUS, '*':MUL, '/':DIV }
rank = { PLUS:2, MINUS:2, MUL:3, DIV:3, LEFT:1, RIGHT:1 }
S, top = [0]*200, 0
Q, end = [0]*200, 0
def getInt():
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s125419869 | p00109 | Wrong Answer | print(*[eval(input()[:-1]) for _ in range(int(input()))], sep="\n")
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s800372813 | p00109 | Wrong Answer | print(*[eval(input()[:-1].replace("/", "//")) for _ in range(int(input()))], sep="\n")
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s548092674 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
print(*[eval(input()[:-1].replace("/", "//")) for _ in range(int(input()))], sep="\n")
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s338597551 | p00109 | Wrong Answer | # -*- coding: utf-8 -*-
# 写経した
import re
class Num:
def __str__(self):
return str(self.x)
def __init__(self, value):
self.x = value
def __add__(self, value):
return Num(self.x + value.x)
def __sub__(self, value):
return Num(self.x - value.x)
def __mul__(self, value):
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s551048650 | p00109 | Wrong Answer | N = int(input())
for i in range(N):
print(int(eval(input().replace("/","//").strip("="))))
| 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s147093733 | p00109 | Wrong Answer | from collections import deque
def eva(l, r, op):
if op == "+":
return l + r
elif op == "-":
return l - r
elif op == "*":
return l * r
elif op == "/":
return l // r
def calc(exp):
i = 0
num = deque()
ops = deque()
ope = ""
while i < len(exp):
... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s856343966 | p00109 | Wrong Answer | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
def main():
n = input()
for i in xrange(n):
line = raw_input()
exec("print %s" % line[:-1])
return 0
if __name__ == '__main__':
sys.exit(main()) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s180248034 | p00109 | Wrong Answer | #!/usr/bin/env python
#-*- coding:utf-8 -*-
n = input()
for i in xrange(n):
line = raw_input()
exec("x = %s" % line[:-1])
print x | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s977483980 | p00109 | Wrong Answer | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import re
n = input()
for i in xrange(n):
line = raw_input()
re.sub("\.\d*", "", line)
exec("x = %s" % line[:-1])
print x | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s545355803 | p00109 | Wrong Answer | n=int(raw_input())
for i in range(n):
print eval(raw_input().split('=')[0]) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s738118346 | p00109 | Wrong Answer | t = input()
for i in range(t):
line = raw_input()
print eval(line[:-1]) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s050170880 | p00109 | Wrong Answer | pos = 0
def number(s):
global pos
result = 0
while s[pos].isdigit():
result *= 10
result += int(s[pos])
pos += 1
return result;
expression = None
def factor(s):
global pos
if s[pos] == '(':
pos += 1
result = expression(s)
pos += 1
return result
else:
return number(s)
def term(s):
global pos
res... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s689446721 | p00109 | Wrong Answer | pos = 0
def number(s):
global pos
x = pos
while s[pos].isdigit():
pos += 1
return int(s[x:pos])
expression = None
def factor(s):
global pos
if s[pos] == '(':
pos += 1
result = expression(s)
pos += 1
return result
else:
return number(s)
def term(s):
global pos
result = factor(s)
while True:
if s[... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s248127220 | p00109 | Wrong Answer | pos = 0
def number(s):
global pos
x = pos
if s[pos] == '-' or s[pos] == '+':
pos += 1
while s[pos].isdigit():
pos += 1
return int(s[x:pos])
expression = None
def factor(s):
global pos
if s[pos] == '(':
pos += 1
result = expression(s)
pos += 1
return result
else:
return number(s)
def term(s):
glob... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s099555937 | p00109 | Wrong Answer | pos = 0
def number(s):
global pos
x = pos
if s[pos] == '-' or s[pos] == '+':
pos += 1
while s[pos].isdigit():
pos += 1
return int(s[x:pos])
expression = None
def factor(s):
global pos
if s[pos] == '(':
pos += 1
result = expression(s)
pos += 1
return result
else:
return number(s)
def term(s):
glob... | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s493925869 | p00109 | Wrong Answer | for i in range(int(raw_input())): print eval(raw_input()[:-1]) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s377491256 | p00109 | Wrong Answer | for unused in xrange(input()):print eval(raw_input().strip("=")) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s707142276 | p00109 | Wrong Answer | for unused in xrange(input()):print eval(raw_input().strip("="))+0 | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s913857741 | p00109 | Wrong Answer | for u in xrange(input()):print eval(raw_input().strip("=")) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s045459853 | p00109 | Wrong Answer | for u in xrange(input()):print int(eval(raw_input().strip("="))) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s998426942 | p00109 | Wrong Answer | for i in range(int(raw_input())):
print eval(raw_input()[:-1]) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s929782458 | p00109 | Wrong Answer | for i in range(int(raw_input())):
print eval(raw_input().rstrip(' \t\r\n=')) | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s740343361 | p00109 | Wrong Answer | for i in range(int(raw_input())):
eval(raw_input()[:-1]); | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s882516483 | p00109 | Wrong Answer | for i in range(int(raw_input())):
print eval(raw_input()[:-1]); | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s743789321 | p00109 | Wrong Answer | n = int(raw_input());
for i in range(n):
print "%d" % eval(raw_input()[:-1]); | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s262037276 | p00109 | Wrong Answer | for i in range(int(raw_input())):
print int(eval(raw_input()[:-1])); | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
s435643721 | p00109 | Wrong Answer | import math;
for i in range(int(raw_input())):
print int(math.floor(eval(raw_input()[:-1]))); | 2
4-2*3=
4*(8+4+3)=
| -2
60
|
<H1>Smart Calculator</H1>
<p>
Your task is to write a program which reads an expression and evaluates it.
</p>
<ul>
<li>The expression consists of numerical values, operators and parentheses, and the ends with '='.</li>
<li>The operators includes +, - , *, / where respectively represents, addition, subtraction, mul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.