s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s531989690 | p00079 | u150984829 | 1520126638 | Python | Python3 | py | Runtime Error | 0 | 0 | 174 | import sys
s=0
p=[list(map(float,e.split(',')))for e in sys.stdin]
x,y=p[0]
print(abs(sum((p[i][0]-x)*(p[i+1][1]-y)-(p[i][1]-y)*(p[i+1][0]-x))for i in range(1,len(p)-1)))/2)
|
s312392038 | p00079 | u150984829 | 1520127592 | Python | Python3 | py | Runtime Error | 0 | 0 | 153 | import sys
s=0
p=[list(map(float,e.split(',')))for e in sys.stdin]
n=len(p)
for i in range(n):a,b=p[i];c,d=p[-~i%n];s+=a*d-b*c
print(s/2)
/////////////
|
s200913849 | p00079 | u150984829 | 1520127602 | Python | Python3 | py | Runtime Error | 0 | 0 | 155 | import sys
s=0
p=[list(map(float,e.split(',')))for e in sys.stdin]
n=len(p)
for i in range(n):a,b=p[i];c,d=p[-~i%n];s+=a*d-b*c
print(s/2)
// abs abs
|
s697308921 | p00079 | u193025715 | 1395734137 | Python | Python | py | Runtime Error | 0 | 0 | 596 | import math
def triangleArea(x1,y1,x2,y2,x3,y3):
a = math.sqrt(((x1 - x2)**2 + (y1 - y2)**2))
b = math.sqrt(((x2 - x3)**2 + (y2 - y3)**2))
c = math.sqrt(((x3 - x1)**2 + (y3 - y1)**2))
z = (a + b + c) / 2
S = math.sqrt(z * (z - a) * (z - b) * (z - c))
return S
apex = []
while True:
try:
apex.append(map(float,... |
s941995527 | p00079 | u193025715 | 1395734205 | Python | Python | py | Runtime Error | 0 | 0 | 596 | import math
def triangleArea(x1,y1,x2,y2,x3,y3):
a = math.sqrt(((x1 - x2)**2 + (y1 - y2)**2))
b = math.sqrt(((x2 - x3)**2 + (y2 - y3)**2))
c = math.sqrt(((x3 - x1)**2 + (y3 - y1)**2))
z = (a + b + c) / 2
S = math.sqrt(z * (z - a) * (z - b) * (z - c))
return S
apex = []
while True:
try:
apex.append(map(float,... |
s391837035 | p00080 | u894114233 | 1476621477 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | def third_root(q):
x=q/2.0
while abs(x**3-q)>=q*10**(-5):
x=x-(x**3-q)/(3*x**2)
return x
while 1:
q=input()
if q==-1:break
ans=third_root(q)
print(ans) |
s168629982 | p00080 | u894114233 | 1476621599 | Python | Python3 | py | Runtime Error | 0 | 0 | 185 | def third_root(q):
x=q/2
while abs(x**3-q)>=q*10**(-5):
x=x-(x**3-q)/(3*x**2)
return x
while 1:
q=input()
if q==-1:break
ans=third_root(q)
print(ans) |
s144055927 | p00080 | u150984829 | 1520128419 | Python | Python3 | py | Runtime Error | 0 | 0 | 1379 | import sys
for e in sys.stdin:print(float(e)**(1/3))
####################################################
####################################################
####################################################
####################################################
####################################################
... |
s413789477 | p00080 | u150984829 | 1520128468 | Python | Python3 | py | Runtime Error | 0 | 0 | 1385 | while 1:
print(float(input())**(1/3))
if q<0:break
####################################################
####################################################
####################################################
####################################################
###############################################... |
s173776244 | p00080 | u150984829 | 1520128491 | Python | Python3 | py | Runtime Error | 0 | 0 | 1393 | while 1:
q=float(input())
if q<0:break
print(q**(1/3))
####################################################
####################################################
####################################################
####################################################
#######################################... |
s450641253 | p00080 | u150984829 | 1520128512 | Python | Python3 | py | Runtime Error | 0 | 0 | 1392 | while 1:
q=float(input())
if q<0:break
print(q**(1/3))
####################################################
####################################################
####################################################
####################################################
#######################################... |
s003392651 | p00081 | u150984829 | 1525258648 | Python | Python3 | py | Runtime Error | 0 | 0 | 190 | import sys
from math import complex as C
for e in sys.stdin:
a,b,c,d,e,f=map(float,e.split(','))
z,w,q=C(a,b),C(c,d),C(e,f)
w-=z
z+=(w/abs(w))**2*(q-z).conjugate()
print(z.real,z.imag)
|
s320726807 | p00081 | u647766105 | 1357204265 | Python | Python | py | Runtime Error | 0 | 0 | 515 | import sys,math
for line in sys.stdin.readlines():
line=raw_input()
x1,y1,x2,y2,xq,yq=map(float,line.strip().split(","))
L=((x1-x2)**2+(y1-y2)**2)**0.5
t=math.atan2(y2-y1,x2-x1)
R1=((x1-xq)**2+(y1-yq)**2)**0.5
R2=((x2-xq)**2+(y2-yq)**2)**0.5
a=math.acos((L*L+R1*R1-R2*R2)/(2*L*R1))
x,y=x1... |
s274250418 | p00081 | u647766105 | 1357369769 | Python | Python | py | Runtime Error | 0 | 0 | 338 | import sys
for line in sys.stdin.readlines():
x1,y1,x2,y2,xq,yq=map(float,line.strip().split(","))
if x1==x2:
x,y=-xq+2*x1,yq
elif y1==y2:
x,y=xq,-yq+2*y1
else:
m=(y1-y2)/(x1-x2)
n=-m*x1+y1
x,y= (2*yq*m-2*m*n+xq-m*m*xq)/(m*m+1),(xq-x)/m+yq;
print "{:.6f} {:.6f... |
s514781156 | p00082 | u540744789 | 1427869647 | Python | Python | py | Runtime Error | 0 | 0 | 880 | v=[4,1,4,1,2,1,2,1]
while True:
x=raw_input()
x=x[0:len(x)-1]
p=map(int,x.split(" "))
min=[]
min_value=0
for i in range(8):
count=0
for j in range(8):
if p[(j)%8]-v[(j+i)%8]>=0:
count+=p[(j)%8]-v[(j+i)%8]
if len(min)==0:
min_value=... |
s463575454 | p00082 | u540744789 | 1427869709 | Python | Python | py | Runtime Error | 0 | 0 | 852 | v=[4,1,4,1,2,1,2,1]
while True:
p=map(int,raw_input().split(" "))
min=[]
min_value=0
for i in range(8):
count=0
for j in range(8):
if p[(j)%8]-v[(j+i)%8]>=0:
count+=p[(j)%8]-v[(j+i)%8]
if len(min)==0:
min_value=count
min.append... |
s944811785 | p00082 | u957021183 | 1505196018 | Python | Python3 | py | Runtime Error | 0 | 0 | 665 | # Aizu Problem 0082: Flying Jenny
#
import sys, math, os
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
def flying_jenny(p):
a = [1, 2, 1, 2, 1, 4, 1, 4]
min_dist = 100000
ans = []
for j in range(8):
dist = sum([max(0, p[k] - a[(... |
s200470188 | p00082 | u104911888 | 1367111833 | Python | Python | py | Runtime Error | 0 | 0 | 571 | merry=[4,1,4,1,2,1,2,1]
while True:
try:
guest=map(int,raw_input().split())
except EOFError:
break
m=10000
for i in range(len(merry)):
temp=merry[i:]+merry[:i]
s=sum([guest[i]-temp[i] for i in range(len(merry)) if guest[i]-temp[i]>\
=0])
m=min(m,s)
P=set([])
... |
s206197802 | p00082 | u104911888 | 1367114617 | Python | Python | py | Runtime Error | 0 | 0 | 478 | merry=[4,1,4,1,2,1,2,1]
while True:
try:
gst=map(int,raw_input().split())
except EOFError:
break
m=10000
ans=set()
for i in range(len(merry)):
temp=merry[i:]+merry[:i]
s=sum([gst[i]-temp[i] for i in range(len(merry)) if gst[i]>temp[i]])
if s<m:
m=s... |
s410098769 | p00082 | u104911888 | 1367115037 | Python | Python | py | Runtime Error | 0 | 0 | 469 | merry=[4,1,4,1,2,1,2,1]
while True:
try:
gst=map(int,raw_input().split())
except EOFError:
break
m=10000
ans=set()
for i in range(len(merry)):
temp=merry[i:]+merry[:i]
s=sum([max(gst[i]-temp[i],0) for i in range(len(merry))])
if s==m:
ans.add("".jo... |
s812981888 | p00082 | u633068244 | 1396076712 | Python | Python | py | Runtime Error | 0 | 0 | 511 | cart = [4,1,4,1,2,1,2,1]
while True:
try:
que = map(int, raw_input().split())
mx,mxcart = 0, "99999999"
for sp in range(8):
sm = 0
for num in range(8):
if cart[(sp+num)%8] <= que[num]:
sm += cart[(sp+num)%8]
else:
sm += que[num]
if sm = mx:
mx = sm
mxcart = "".join(map(str, car... |
s109071385 | p00082 | u633068244 | 1396076745 | Python | Python | py | Runtime Error | 0 | 0 | 512 | cart = [4,1,4,1,2,1,2,1]
while True:
try:
que = map(int, raw_input().split())
mx,mxcart = 0, "99999999"
for sp in range(8):
sm = 0
for num in range(8):
if cart[(sp+num)%8] <= que[num]:
sm += cart[(sp+num)%8]
else:
sm += que[num]
if sm = mx:
mx = sm
mxcart = "".join(map(str, car... |
s762670977 | p00082 | u759949288 | 1403583805 | Python | Python | py | Runtime Error | 0 | 0 | 443 | import sys
patterns = [[1, 2, 1, 2, 1, 4, 1, 4],
[1, 2, 1, 4, 1, 4, 1, 2],
[1, 4, 1, 4, 1, 2, 1, 2],
[2, 1, 2, 1, 4, 1, 4, 1],
[2, 1, 4, 1, 4, 1, 2, 1],
[4, 1, 2, 1, 2, 1, 4, 1],
[4, 1, 4, 1, 2, 1, 2, 1],
]
for line in sys.stdin:
p = [int(x) for x in line.split()]
m = sum(p)
pt = None
for ptn in patterns:
... |
s715427564 | p00082 | u759949288 | 1403583910 | Python | Python | py | Runtime Error | 0 | 0 | 466 | import sys
patterns = [[1, 2, 1, 2, 1, 4, 1, 4],
[1, 2, 1, 4, 1, 4, 1, 2],
[1, 4, 1, 4, 1, 2, 1, 2],
[2, 1, 2, 1, 4, 1, 4, 1],
[2, 1, 4, 1, 4, 1, 2, 1],
[4, 1, 2, 1, 2, 1, 4, 1],
[4, 1, 4, 1, 2, 1, 2, 1],
]
for line in sys.stdin:
if not line: continue
p = [int(x) for x in line.split()]
m = sum(p)
pt = None
... |
s251324339 | p00083 | u032662562 | 1489821123 | Python | Python3 | py | Runtime Error | 0 | 0 | 766 | from datetime import datetime
def era(f):
meiji_st = datetime(1868, 9, 8)
taisho_st = datetime(1912, 7,30)
showa_st = datetime(1926,12,25)
heisei_st = datetime(1989, 1, 8)
y,m,d = f
dt = datetime(y,m,d)
if dt > heisei_st:
ret = "heisei %d %d %d" % (dt.year - heisei_st.year+1,dt.mo... |
s400206773 | p00083 | u350508326 | 1371306482 | Python | Python | py | Runtime Error | 0 | 0 | 4648 | while True:
try:
... |
s312746346 | p00084 | u489809100 | 1446630210 | Python | Python | py | Runtime Error | 0 | 0 | 252 | while True:
code = raw_input()
code = code.replace(",","")
code = code.replace(".","")
code = code.split()
list = []
for var in code:
if len(var) >= 3 and len(var) <= 6:
list.append(var)
for var in list:
print var,
print "" |
s215713364 | p00084 | u150984829 | 1525266362 | Python | Python3 | py | Runtime Error | 0 | 0 | 75 | import re
print(*[x for x in re.split(r'\s|"|,|\.',input())if 2<len(s)<7])
|
s363244311 | p00084 | u633068244 | 1396078203 | Python | Python | py | Runtime Error | 0 | 0 | 116 | msg = map(str, raw_input().replace(",","").replace(".","").split())
for w in msg:
print w, if 2 < len(w) <7 else "" |
s680815560 | p00084 | u912237403 | 1398011863 | Python | Python | py | Runtime Error | 0 | 0 | 100 | s=raw_input().replace(","," ").replace("."," ").split()
s=" ".join(map(lambda 2<len(w)<7 s))
print s |
s665464244 | p00085 | u133119785 | 1498916783 | Python | Python3 | py | Runtime Error | 0 | 0 | 349 | def act(t,m,l):
t = (t+m) % len(l);
del l[t-1]
return (t-1) % (len(l)+1)
while True:
i = raw_input().split()
n = int(i[0])
m = int(i[1])
if n == 0 and m == 0:
break
else:
l = range(1,n+1)
t = 0
for i in range(n-1):
tt = act(t,m,l);
... |
s992484459 | p00085 | u136916346 | 1528728044 | Python | Python3 | py | Runtime Error | 0 | 0 | 285 | while 1:
n,m=list(map(int,input().split()))
if n==0 and m==0:break
l=range(1,1+n)
st=m-1
while len(l)!=1:
del l[st]
st+=(m-1)
while 1:
if st>=len(l):
st=st-len(l)
if st<len(l):break
print(l[0])
|
s617405635 | p00085 | u647766105 | 1357095124 | Python | Python | py | Runtime Error | 0 | 0 | 163 | def f(n,k):
return 0 if n==0 else (f(n-1,k)+k)%n
while True:
n,k=map(int,raw_input().strip().split())
if (n,k)==(0,0):
break
print f(n,k)+1 |
s713227756 | p00085 | u865312527 | 1372955395 | Python | Python | py | Runtime Error | 0 | 0 | 190 | while 1:
n,m=map(int,raw_input())
if n==0==m: break
data=range(n)
pos=m
while len(data)!=1:
del data[pos]
pos+=m
if pos>=len(data): pos-=len(data) |
s352191655 | p00085 | u633068244 | 1393847266 | Python | Python | py | Runtime Error | 0 | 0 | 455 | while True:
n, m = map(int, raw_input().split())
if n == 0 and m == 0:
break
p = [1 for i in range(n)]
pn = n; count = 0
while pn > 1:
for i in range(n):
if p[i] == 1:
count += 1
if count == m:
... |
s450558123 | p00085 | u633068244 | 1393847375 | Python | Python | py | Runtime Error | 0 | 0 | 457 | while True:
n, m = map(int, raw_input().split())
if n == 0 and m == 0:
break
p = [ 1 for i in range(n) ]
pn = n; count = 0
while pn > 1:
for i in range(n):
if p[i] == 1:
count += 1
if count == m:
... |
s888727844 | p00085 | u633068244 | 1393847806 | Python | Python | py | Runtime Error | 0 | 0 | 599 | while True:
n, m = map(int, raw_input().split())
if n == 0 and m == 0:
break
p = [ 1 for i in range(n) ]
pn = n; count = 0; flag = 1
while flag = 1:
for i in range(n):
if p[i] == 1:
count += 1
if coun... |
s194552868 | p00086 | u798803522 | 1473685878 | Python | Python3 | py | Runtime Error | 0 | 0 | 322 | import sys
data = sys.stdin.readlines()
targ= {}
for d in data:
temp = d.split(' ')
if temp[0] == temp[1] == 0:
for k in targ.keys():
if targ[k] % 2 != 0:
print("NG")
break
else:
print("OK")
else:
targ[temp] = targ.get(temp,0) +... |
s379987841 | p00086 | u811733736 | 1505386216 | Python | Python3 | py | Runtime Error | 0 | 0 | 777 | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0086
"""
import sys
from sys import stdin
input = stdin.readline
def main(args):
while True:
routes = []
while True:
a, b = map(int, input().split())
if a == 0 and b == 0:
... |
s656794667 | p00086 | u659034691 | 1505685161 | Python | Python3 | py | Runtime Error | 0 | 0 | 388 | while True:
try:
v=[]
a,b=(int(i) for i in input().split())
while a!=0 or b!=0:
while b>len(v):
v.append(0)
v[a]+=1
v[b]+=1
a=0
while a<len(v) and v[a]%2==0:
a+=1
if a<len(v):
print("NG")
... |
s640134573 | p00086 | u150984829 | 1525269654 | Python | Python3 | py | Runtime Error | 0 | 0 | 166 | import sys
v=[0]*101
for e in sys.stdin:
a,b=map(int,e.split())
v[a]+=1;v[b]+=1
if a==0:
print(['OK','NG'][(v[1]&1)*(v[2]&1)*sum(x&1 for x in v)-2])
v=[0]*101
|
s124203302 | p00086 | u878596989 | 1528104177 | Python | Python3 | py | Runtime Error | 0 | 0 | 534 | # -*- coding: utf-8 -*-
# 宇都宮涼
# J5-170029
# Tax Rate Changed
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp? id=1192&lang=jp
# 右中央
while True:
a,b,c = map(int, input().strip().split(' '))
temp = 0
if a == 0 and b == 0 and c == 0:
break
for i in range(1, c):
for j in range(... |
s973147116 | p00086 | u878596989 | 1528104224 | Python | Python3 | py | Runtime Error | 0 | 0 | 541 | # -*- coding: utf-8 -*-
# 宇都宮涼
# J5-170029
# Tax Rate Changed
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp? id=1192&lang=jp
# 右中央
from sys import stdin
temp = [0] * 50
while True:
a,b = map(int, input().strip().split(' '))
boolean = True
if a == 0 and b == 0:
for i in range(len(tem... |
s965200829 | p00086 | u782850731 | 1379211696 | Python | Python | py | Runtime Error | 0 | 0 | 554 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
from collections import Counter
cnt = Counter()
for line in stdin:
start, end = (int(s) for s in line.split())
if start or end:
... |
s861547748 | p00086 | u822971508 | 1401196350 | Python | Python3 | py | Runtime Error | 0 | 0 | 653 | #coding:utf-8
while 1:
try:
#初期化
key=[]
for i in range(101):
key.append(0)
flag = 0
#オイラー路:すべての頂点のうち、次数が奇数であるものがちょうど2つ(入口と出口)
while 1:
input = map(int, raw_input().split())
if(input[0] == 0 and input[1] == 0):
break
... |
s984418109 | p00086 | u822971508 | 1401196931 | Python | Python3 | py | Runtime Error | 0 | 0 | 312 | while True:
try:
path = [0]*100
while True:
a,b = map(int, raw_input().split())
if a == 0: break
path[a-1] += 1; path[b-1] += 1
if (path[0]%2 == path[1]%2 == 1 ):
print "OK"
else:
print "NG"
except:
break |
s302528915 | p00086 | u822971508 | 1401196979 | Python | Python3 | py | Runtime Error | 0 | 0 | 318 | while True:
try:
path = [0]*100
while True:
a,b = map(int, raw_input().split())
if a == 0: break
path[a-1] += 1; path[b-1] += 1
if (path[0]%2 == 1 and path[1]%2 == 1 ):
print "OK"
else:
print "NG"
except:
break |
s538059107 | p00086 | u822971508 | 1401197916 | Python | Python | py | Runtime Error | 0 | 0 | 547 | #coding:utf-8
#初期化
key=[0]*101
flag = 0;
#オイラー路:すべての頂点のうち、次数が奇数であるものがちょうど2つ(入口と出口)
while 1:
input = map(int, raw_input().split())
if(input[0] == 0 and input[1] == 0):
break
key[input[0]]+=1
key[input[1]]+=1
... |
s049248997 | p00086 | u822971508 | 1401200986 | Python | Python | py | Runtime Error | 0 | 0 | 565 | #coding:utf-8
while 1:
try:
#初期化
key=[0]*101
#オイラー路:すべての頂点のうち、次数が奇数であるものがちょうど2つ(入口と出口)
while 1:
input = map(int, raw_input().split())
if(input[0] == 0 and input[1] == 0):
break
key[input[0]]+=1
key[input[1]]+=1
... |
s873222919 | p00087 | u567380442 | 1423312724 | Python | Python3 | py | Runtime Error | 0 | 0 | 443 | import sys
f = sys.stdin
from collections import deque
import operator
func = {'+':operator.add,'-':operator.sub,'*':operator.mul,'/':operator.truediv }
for line in f:
stack = deque()
for element in line.strip().split():
if element.isdigit():
stack.append(int(element))
else:
... |
s805462342 | p00087 | u567380442 | 1423312846 | Python | Python3 | py | Runtime Error | 0 | 0 | 464 | import sys
f = sys.stdin
from collections import deque
import operator
func = {'+':operator.add,'-':operator.sub,'*':operator.mul,'/':operator.truediv }
for line in f:
stack = deque()
for element in line.strip().split():
if element.isdigit():
stack.append(float(element))
else:
... |
s298829696 | p00087 | u567380442 | 1423314784 | Python | Python3 | py | Runtime Error | 0 | 0 | 460 | import sys
f = sys.stdin
from collections import deque
import operator
func = {'+':operator.add,'-':operator.sub,'*':operator.mul,'/':operator.div }
for line in f:
stack = deque()
for element in line.strip().split():
if element.isdigit():
stack.append(float(element))
else:
... |
s519358433 | p00087 | u879226672 | 1428079065 | Python | Python | py | Runtime Error | 0 | 0 | 692 | def reverse_polish(order):
stack = []
for i in range(len(order)):
if order[i].isdigit():
stack.append(float(order[i]))
elif order[i]=='+':
tmp=stack.pop()+stack.pop()
stack.append(tmp)
elif order[i]=='-':
tmp=-stack.pop()+stack.pop()
... |
s561965677 | p00087 | u879226672 | 1428079103 | Python | Python | py | Runtime Error | 0 | 0 | 707 | def reverse_polish(order):
stack = []
for i in range(len(order)):
if order[i].isdigit():
stack.append(float(order[i]))
elif order[i]=='+':
tmp=stack.pop()+stack.pop()
stack.append(tmp)
elif order[i]=='-':
tmp=-stack.pop()+stack.pop()
... |
s604453778 | p00087 | u879226672 | 1428079294 | Python | Python | py | Runtime Error | 0 | 0 | 699 | def reverse_polish(order):
stack = []
for i in range(len(order)):
if order[i].isdigit():
stack.append(float(order[i]))
elif order[i]=='+':
tmp=stack.pop()+stack.pop()
stack.append(tmp)
elif order[i]=='-':
tmp=-stack.pop()+stack.pop()
... |
s762706742 | p00087 | u145563629 | 1428933214 | Python | Python | py | Runtime Error | 0 | 0 | 438 | while 1:
su = 0
stack = []
raw = raw_input().split()
for s in raw:
if s == "-":
stack.append(stack.pop(-2) - stack.pop())
elif s == "+":
stack.append(stack.pop(-2) + stack.pop())
elif s == "/":
stack.append(stack.pop(-2) / stack.pop())
elif s == "*":
stack.append(stack.pop(-2) * stack.pop())
... |
s256556195 | p00087 | u145563629 | 1428933276 | Python | Python | py | Runtime Error | 0 | 0 | 480 | while 1:
su = 0
stack = []
try:
raw = raw_input().split()
except:
pass
else:
for s in raw:
if s == "-":
stack.append(stack.pop(-2) - stack.pop())
elif s == "+":
stack.append(stack.pop(-2) + stack.pop())
elif s == "/":
stack.append(stack.pop(-2) / stack.pop())
elif s == "*":
stack.... |
s248286607 | p00087 | u145563629 | 1428933491 | Python | Python | py | Runtime Error | 0 | 0 | 438 | while 1:
su = 0
stack = []
raw = raw_input().split()
for s in raw:
if s == "-":
stack.append(stack.pop(-2) - stack.pop())
elif s == "+":
stack.append(stack.pop(-2) + stack.pop())
elif s == "/":
stack.append(stack.pop(-2) / stack.pop())
elif s == "*":
stack.append(stack.pop(-2) * stack.pop())
e... |
s568828260 | p00087 | u145563629 | 1428933594 | Python | Python | py | Runtime Error | 0 | 0 | 442 | while 1:
stack = []
try:
for s in raw_input().split():
if s == "-":
stack.append(stack.pop(-2) - stack.pop())
elif s == "+":
stack.append(stack.pop(-2) + stack.pop())
elif s == "/":
stack.append(stack.pop(-2) / stack.pop())
elif s == "*":
stack.append(stack.pop(-2) * stack.pop())
el... |
s398106943 | p00087 | u882992966 | 1441261156 | Python | Python3 | py | Runtime Error | 0 | 0 | 610 | def calc_inverse_polish_notation_string(s):
tokens = [token for token in s.split(' ') if token != '']
stack = []
for token in tokens:
if token in ['+', '-', '*', '/']:
val2 = stack.pop()
val1 = stack.pop()
result = eval("%s %s %s" % (val1, token, val2))
... |
s859864768 | p00087 | u882992966 | 1441311356 | Python | Python3 | py | Runtime Error | 0 | 0 | 810 | #!/usr/bin/env python3
import sys
def main():
lines = sys.stdin.readlines()
(_, quantum) = lines[0].split(' ')
quantum = int(quantum)
processes = []
for line in lines[1:]:
if line.strip() == '':
break
(k, v) = line.strip().split(' ')
processes.append((k, int(... |
s132845455 | p00087 | u160041984 | 1473727778 | Python | Python3 | py | Runtime Error | 0 | 0 | 370 | import sys
def line():return sys.stdin.readline().strip()
ops = {"+":lambda a,b:b + a,
"-":lambda a,b:b - a,
"*":lambda a,b:b * a,
"/":lambda a,b:b / a}
while True:
stack = []
for s in line().split():
if s in ops:
stack.append(ops[s](stack.pop(),stack.pop()))
else:
... |
s838162442 | p00087 | u925992597 | 1488242870 | Python | Python3 | py | Runtime Error | 0 | 0 | 131 | s=list();[s.append(eval('{2}{1}{0}'.format(s.pop(),i,s.pop()))if(i in'+-*/')else i)for i in __import__('sys').argv[1:]];print(s[0]) |
s132838835 | p00087 | u925992597 | 1488299190 | Python | Python3 | py | Runtime Error | 0 | 0 | 173 | s=list();[[[s.append(eval('{2}{1}{0}'.format(s.pop(),i,s.pop()))if(i in'+-*/')else i)for i in input().split(' ')]and print(s.pop())]for x in __import__('itertools').count()] |
s924402791 | p00087 | u546285759 | 1495184013 | Python | Python3 | py | Runtime Error | 0 | 0 | 338 | import re
while True:
try:
f = input().split()
except:
break
stack = []
for c in f:
if re.match("-*[0-9]", c) is None:
b, a = stack.pop(), stack.pop()
stack.append(eval("{}{}{}".format(a, c, b)))
else:
stack.append(c)
print("{0:.6f}"... |
s583165274 | p00087 | u452926933 | 1520305248 | Python | Python | py | Runtime Error | 0 | 0 | 980 | def is_float_str(num_str, default=0):
try:
return {"is_float": True, "val": float(num_str)}
except ValueError:
return {"is_float": False, "val": default}
def compute(operand, val1, val2):
if operand == "+":
return val1 + val2
elif operand == "-":
return val1 - val2
... |
s900203943 | p00087 | u290605490 | 1356583205 | Python | Python | py | Runtime Error | 0 | 0 | 508 | from __future__ import division
while True:
try:
s=raw_input().rstrip().split()
except EOFError:
break
L=[]
for d in s:
if d.isdigit():
L.append(int(d))
else:
op1=L.pop()
op2=L.pop()
if d=="-":
L.append(op2-o... |
s829158029 | p00087 | u290605490 | 1356583289 | Python | Python | py | Runtime Error | 0 | 0 | 478 | while True:
try:
s=raw_input().rstrip().split()
except EOFError:
break
L=[]
for d in s:
if d.isdigit():
L.append(float(d))
else:
op1=L.pop()
op2=L.pop()
if d=="-":
L.append(op2-op1)
elif d=="+":
... |
s542108412 | p00087 | u290605490 | 1356583803 | Python | Python | py | Runtime Error | 0 | 0 | 481 | while True:
try:
s=raw_input().strip().split()
except EOFError:
break
L=[]
for d in s:
if not d.isdigit():
op1=L.pop()
op2=L.pop()
if d=="-":
L.append(op2-op1)
elif d=="+":
L.append(op2+op1)
... |
s658710328 | p00087 | u290605490 | 1356584057 | Python | Python | py | Runtime Error | 0 | 0 | 484 | while True:
try:
s=raw_input().strip().split()
except EOFError:
break
L=[]
for d in s:
if d.isdigit():
L.append(float(d))
else:
op1=L.pop()
op2=L.pop()
if d=="-":
L.append(op2-op1)
elif d=="+":
... |
s311559212 | p00087 | u290605490 | 1356584122 | Python | Python | py | Runtime Error | 0 | 0 | 433 | import sys
for s in sys.stdin.readlines():
L=[]
for d in s:
if d.isdigit():
L.append(float(d))
else:
op1=L.pop()
op2=L.pop()
if d=="-":
L.append(op2-op1)
elif d=="+":
L.append(op2+op1)
elif d=... |
s622223729 | p00087 | u290605490 | 1356584229 | Python | Python | py | Runtime Error | 0 | 0 | 348 | import sys
for s in sys.stdin.readlines():
L=[]
for d in s:
if d=="-":
L.append(-(L.pop()-L.pop()))
elif d=="+":
L.append(L.pop()+L.pop())
elif d=="*":
L.append(L.pop()*L.pop())
elif d=="/":
L.append(1/L.pop()*L.pop())
L.app... |
s783282144 | p00087 | u782850731 | 1379215845 | Python | Python | py | Runtime Error | 0 | 0 | 647 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
for line in stdin:
stack = []
for s in line.split():
if s.isdigit():
stack.append(float(s))
elif s == '+':... |
s825684418 | p00087 | u260980560 | 1384351969 | Python | Python | py | Runtime Error | 0 | 0 | 493 | while 1:
try:
ipt = raw_input().split()
except EOFError:
break;
s = []
for i in range(len(ipt)):
if ipt[i].isdigit():
s.append(float(ipt[i]))
else:
b = s.pop(); a = s.pop();
if ipt[i]=='+':
s.append(a+b)
elif... |
s408674944 | p00087 | u260980560 | 1384352076 | Python | Python | py | Runtime Error | 0 | 0 | 509 | while 1:
try:
ript = raw_input()
except EOFError:
break;
ipt = ript.split()
s = []
for i in range(len(ipt)):
if ipt[i].isdigit():
s.append(float(ipt[i]))
else:
b = s.pop(); a = s.pop();
if ipt[i]=='+':
s.append(a+b)
... |
s129908282 | p00087 | u260980560 | 1384352162 | Python | Python | py | Runtime Error | 0 | 0 | 554 | while 1:
try:
ipt = raw_input().split()
s = []
for i in range(len(ipt)):
if ipt[i].isdigit():
s.append(float(ipt[i]))
else:
b = s.pop(); a = s.pop();
if ipt[i]=='+':
s.append(a+b)
eli... |
s808443833 | p00087 | u260980560 | 1384352284 | Python | Python | py | Runtime Error | 0 | 0 | 568 | while 1:
try:
ipt = raw_input().split()
s = []
for i in range(len(ipt)):
if ipt[i].isdigit():
s.append(float(ipt[i]))
else:
b = s.pop(); a = s.pop();
if ipt[i]=='+':
s.append(a+b)
eli... |
s611819591 | p00087 | u260980560 | 1385213363 | Python | Python | py | Runtime Error | 0 | 0 | 422 | import sys
for s in sys.stdin.readlines():
st = []
for c in s.split():
if c.isdigit():
st.append(float(c))
else:
b = st.pop(); a = st.pop();
if c=='+':
st.append(a+b)
elif c=='-':
st.append(a-b)
elif c=='... |
s426596198 | p00087 | u336443042 | 1393508333 | Python | Python | py | Runtime Error | 0 | 0 | 530 | import sys
for line in iter(sys.stdin.readline, ""):
foo=map(str, line.strip().split())
stack=[]
while (foo!=[]):
if foo[0]=='+':
del foo[0]
stack.append(int(stack.pop())+int(stack.pop()))
elif foo[0]=='*':
del foo[0]
stack.append(int(stack.pop())*int(stack.pop()))
elif foo[0]=='-':
del foo[0]
... |
s387753256 | p00087 | u336443042 | 1393508532 | Python | Python | py | Runtime Error | 0 | 0 | 523 | import sys
for line in sys.stdin.readlines():
foo=map(str, line.strip().split())
stack=[]
while (foo!=[]):
if foo[0]=='+':
del foo[0]
stack.append(int(stack.pop())+int(stack.pop()))
elif foo[0]=='*':
del foo[0]
stack.append(int(stack.pop())*int(stack.pop()))
elif foo[0]=='-':
del foo[0]
stack... |
s153155186 | p00087 | u633068244 | 1393853385 | Python | Python | py | Runtime Error | 0 | 0 | 582 | while True:
inp = map(str, raw_input().split())
stuck = []
for i in inp:
if i == "+":
stuck.append(int(stuck.pop(len(stuck)-2)) + int(stuck.pop(len(stuck)-1)) )
elif i == "-":
stuck.append(int(stuck.pop(len(stuck)-2)) - int(stuck.pop(len(stuck)-1)) )
elif i ==... |
s088851286 | p00087 | u193025715 | 1395420459 | Python | Python | py | Runtime Error | 0 | 0 | 491 | while True:
calc = raw_input().split()
ans = []
while len(calc) != 0:
if calc[0].isdigit():
ans.append(calc.pop(0))
else:
mark = calc[0]
if mark == "+":
tmp = float(ans.pop()) + float(ans.pop())
elif mark == "-":
tmp = -float(ans.pop()) + float(ans.pop())
elif mark == "*":
tmp = float(... |
s271688288 | p00087 | u193025715 | 1395421107 | Python | Python | py | Runtime Error | 0 | 0 | 219 | while True:
stack = []
for s in raw_input().split():
if s in ('+', '-', '*', '/'):
stack.append(eval('{2}{1}{0}'.format(stack.pop(), s, stack.pop())))
else:
stack.append(float(s))
print '%.6f' % stack.pop() |
s990474453 | p00087 | u193025715 | 1395421145 | Python | Python | py | Runtime Error | 0 | 0 | 234 | while True:
stack = []
for s in raw_input().split():
if s in ('+', '-', '*', '/'):
stack.append(eval('{2}{1}{0}'.format(stack.pop(), s, stack.pop())))
else:
stack.append(float(s))
print '%.6f' % stack.pop() |
s986524994 | p00087 | u260980560 | 1397482140 | Python | Python | py | Runtime Error | 0 | 0 | 430 | import sys
for s in sys.stdin.readlines():
st = []
for c in s.strip().split():
if c.isdigit():
st.append(float(c))
else:
b = st.pop(); a = st.pop();
if c=='+':
st.append(a+b)
elif c=='-':
st.append(a-b)
e... |
s247698970 | p00088 | u032662562 | 1487919271 | Python | Python3 | py | Runtime Error | 0 | 0 | 1637 | class Code:
def __init__(self):
True
self.cd1 = {" ":"101","'":"000000",",":"000011","-":"10010001",".":"010001","?":"000001","A":"100101","B":"10011010","C":"0101","D":"0001","E":"110","F":"01001","G":"10011011","H":"010000","I":"0111","J":"10011000","K":"0110","L":"00100","M":"10011001","N":"100... |
s728876983 | p00088 | u032662562 | 1487919372 | Python | Python3 | py | Runtime Error | 0 | 0 | 1623 | class Code:
def __init__(self):
self.cd1 = {" ":"101","'":"000000",",":"000011","-":"10010001",".":"010001","?":"000001","A":"100101","B":"10011010","C":"0101","D":"0001","E":"110","F":"01001","G":"10011011","H":"010000","I":"0111","J":"10011000","K":"0110","L":"00100","M":"10011001","N":"10011110","O":"00... |
s235830356 | p00088 | u150984829 | 1518087855 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | a='101'.join(''.join(d[c]for c in e.strip())for e in sys.stdin)
l=len(a)+4
b=a.ljust(l//5*5,'0')
print(''.join("ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?"[int(b[i:i+5],2)]for i in range(0,l,5)))
|
s053232336 | p00088 | u150984829 | 1518087870 | Python | Python3 | py | Runtime Error | 0 | 0 | 620 | import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110',
'F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111',
'Q':'10011111','R':'1000',... |
s111729791 | p00088 | u150984829 | 1518087880 | Python | Python3 | py | Runtime Error | 0 | 0 | 618 | import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110','F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111','Q':'10011111','R':'1000','S... |
s525246960 | p00088 | u150984829 | 1518088216 | Python | Python3 | py | Runtime Error | 0 | 0 | 613 | import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110',
'F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111',
'Q':'10011111','R':'1000',... |
s860029576 | p00088 | u150984829 | 1518088478 | Python | Python3 | py | Runtime Error | 0 | 0 | 635 | import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110',
'F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111',
'Q':'10011111','R':'1000',... |
s519529312 | p00088 | u150984829 | 1518088739 | Python | Python3 | py | Runtime Error | 0 | 0 | 606 | import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110',
'F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111',
'Q':'10011111','R':'1000',... |
s620850549 | p00088 | u150984829 | 1520205530 | Python | Python3 | py | Runtime Error | 0 | 0 | 606 | import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110',
'F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111',
'Q':'10011111','R':'1000',... |
s104646328 | p00088 | u352394527 | 1527592715 | Python | Python3 | py | Runtime Error | 0 | 0 | 1353 | dic1 = {" ":"101", "'":"000000", ",":"000011", "-":"10010001", "?":"000001",
"A":"100101", "B":"10011010", "C":"0101", "D":"0101", "E":"110",
"F":"01001", "G":"10011011", "H":"010000", "I":"0111", "J":"10011000",
"K":"0110", "L":"00100", "M":"10011001", "N":"10011110", "O":"00101",
"P":"... |
s637385468 | p00088 | u352394527 | 1527592750 | Python | Python3 | py | Runtime Error | 0 | 0 | 1289 | dic1 = {" ":"101", "'":"000000", ",":"000011", "-":"10010001", "?":"000001",
"A":"100101", "B":"10011010", "C":"0101", "D":"0101", "E":"110",
"F":"01001", "G":"10011011", "H":"010000", "I":"0111", "J":"10011000",
"K":"0110", "L":"00100", "M":"10011001", "N":"10011110", "O":"00101",
"P":"... |
s522452212 | p00088 | u290605490 | 1355291663 | Python | Python | py | Runtime Error | 0 | 5440 | 1064 | d1={
" ":"101",
"'":"000000",
",":"000011",
"-":"10010001",
".":"010001",
"?":"000001",
"A":"100101",
"B":"10011010",
"C":"0101",
"D":"0001",
"E":"110",
"F":"01001",
"G":"10011011",
"H":"010000",
"I":"0111",
"J":"10011000",
"K":"0110",
"L":"00100",
"M":"10011001",
"N":"10011110",
"O":"00101",
"P":"111",
"Q":"10011111",... |
s288780371 | p00088 | u193025715 | 1395563209 | Python | Python | py | Runtime Error | 0 | 0 | 1235 | encode = {' ':'101', '\'':'000000', ',':'000011', '-':'1001000', '.':'010001', '?':'000001', 'A':'100101', 'B':'10011010', 'C':'0101', 'D':'0001', 'E':'110', 'F':'01001', 'G':'10011011', 'H':'010000', 'I':'0111', 'J':'10011000', 'K':'0110', 'L':'00100', 'M':'10011001', 'N':'10011110', 'O':'00101', 'P':'111', 'Q':'10011... |
s115960538 | p00088 | u193025715 | 1395563379 | Python | Python | py | Runtime Error | 0 | 0 | 1253 | encode = {' ':'101', '\'':'000000', ',':'000011', '-':'1001000', '.':'010001', '?':'000001', 'A':'100101', 'B':'10011010', 'C':'0101', 'D':'0001', 'E':'110', 'F':'01001', 'G':'10011011', 'H':'010000', 'I':'0111', 'J':'10011000', 'K':'0110', 'L':'00100', 'M':'10011001', 'N':'10011110', 'O':'00101', 'P':'111', 'Q':'10011... |
s905729364 | p00088 | u193025715 | 1396170676 | Python | Python | py | Runtime Error | 0 | 0 | 1253 | encode = {' ':'101', '\'':'000000', ',':'000011', '-':'1001000', '.':'010001', '?':'000001', 'A':'100101', 'B':'10011010', 'C':'0101', 'D':'0001', 'E':'110', 'F':'01001', 'G':'10011011', 'H':'010000', 'I':'0111', 'J':'10011000', 'K':'0110', 'L':'00100', 'M':'10011001', 'N':'10011110', 'O':'00101', 'P':'111', 'Q':'10011... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.