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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s653663111 | p00574 | u002193969 | 1522546959 | Python | Python3 | py | Runtime Error | 0 | 0 | 776 | L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
i = 0
anslist = []
while i < Q:
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(input())
for x in range(0,L):
for snake in snakelist:
if snake[x] == "?":
a = snake[:x] + "0... |
s954767378 | p00574 | u002193969 | 1522547184 | Python | Python3 | py | Runtime Error | 0 | 0 | 777 | L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
i = 0
anslist = []
while i < Q:
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(input())
for x in range(0,L):
for snake in snakelist:
if snake[x] == "?":
a = snake[:x] + "0... |
s967968880 | p00574 | u002193969 | 1522547371 | Python | Python3 | py | Runtime Error | 0 | 0 | 777 | L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
i = 0
anslist = []
while i < Q:
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(input())
for x in range(0,L):
for snake in snakelist:
if snake[x] == "?":
a = snake[:x] + "0... |
s149276794 | p00574 | u002193969 | 1522547600 | Python | Python3 | py | Runtime Error | 0 | 0 | 771 | L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
anslist = []
for i in range(0, Q):
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(input())
for x in range(0, L):
for snake in snakelist:
if snake[x] == "?":
a = snake[:x] ... |
s361369788 | p00574 | u002193969 | 1522547981 | Python | Python3 | py | Runtime Error | 0 | 0 | 833 | L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
report = []
for i in range(0,Q):
report.append(input())
anslist = []
for i in range(0, Q):
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(report[i])
for x in range(0, L):
for snake in snakelist:
... |
s329578906 | p00574 | u002193969 | 1522548408 | Python | Python3 | py | Runtime Error | 0 | 0 | 873 | import gc
L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
report = []
for i in range(Q):
report.append(input())
anslist = []
for i in range(Q):
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(report[i])
for x in range(0, L):
for snake in snakel... |
s293273994 | p00574 | u002193969 | 1522548576 | Python | Python3 | py | Runtime Error | 0 | 0 | 872 | import gc
L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
report = []
for i in range(Q):
report.append(input())
anslist = []
for i in range(Q):
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(report[i])
for x in range(0, L):
for snake in snakel... |
s487304964 | p00574 | u002193969 | 1522548646 | Python | Python3 | py | Runtime Error | 0 | 0 | 872 | import gc
L, Q = [int(x) for x in input().split()]
poison = [int(x) for x in list(input())]
report = []
for i in range(Q):
report.append(input())
anslist = []
for i in range(Q):
ans = 0
snakelist = []
newsnakelist = []
snakelist.append(report[i])
for x in range(0, L):
for snake in snakel... |
s676402545 | p00574 | u724548524 | 1526260994 | Python | Python3 | py | Runtime Error | 0 | 0 | 497 | def cs(c,s):
global count
if len(s) == 1:
if s[0] == "?":
count += sum(c)
else:
count += c[int(s[0])]
elif s[0] == "0":
cs(c[:2**(len(s) - 1)], s[1:])
elif s[0] == "1":
cs(c[2**(len(s) - 1):], s[1:])
else:
cs(c[:2**(len(s) - 1)], s[1:])... |
s176976272 | p00574 | u724548524 | 1526261089 | Python | Python3 | py | Runtime Error | 0 | 0 | 495 | def cs(c,s):
global count
if len(s) == 1:
if s[0] == "?":
count += int(c[0]) + int(c[1])
else:
count += int(c[int(s[0])])
elif s[0] == "0":
cs(c[:2**(len(s) - 1)], s[1:])
elif s[0] == "1":
cs(c[2**(len(s) - 1):], s[1:])
else:
cs(c[:2**(... |
s310406492 | p00575 | u164933847 | 1559400780 | Python | Python3 | py | Runtime Error | 0 | 0 | 93 | import math
inputs = inout().split(" ")
print(math.cell(inputs[2]/(inputs[0]+inputs[1]/7))
|
s158487302 | p00575 | u164933847 | 1559400875 | Python | Python3 | py | Runtime Error | 0 | 0 | 80 | inputs = inout().split(" ")
print(math.cell(inputs[2]/(inputs[0]+inputs[1]/7))
|
s297976264 | p00575 | u164933847 | 1559484604 | Python | Python3 | py | Runtime Error | 0 | 0 | 83 | inputs = input().split(" ")
print(math.ceil(inputs[2]/(inputs[0]+(inputs[1]/7))))
|
s487797180 | p00575 | u164933847 | 1559484732 | Python | Python3 | py | Runtime Error | 0 | 0 | 84 | inputs = input().split(" ")
print(math.ceil(inputs[2]/(inputs[0]+(inputs[1]/7))))
|
s194826684 | p00576 | u406093358 | 1555907389 | Python | Python | py | Runtime Error | 0 | 0 | 645 | #include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main(){
int board[2020];
for(int i = 0; i < 2020; i++){
board[i] = 0;
}
int N;
cin >> N;
int tkn[N];
for(int i = 0; i < N; i++){
int p = 0;
cin >> p;
tkn[i] = p;
board[p] = i + 1;
}
int M;
cin >> M;
for(int i = 0; i... |
s912116711 | p00586 | u150414576 | 1408117180 | Python | Python | py | Runtime Error | 0 | 0 | 181 | def run(infile,outfile):
for line in infile.readline():
x, y = map(int,line.sprit())
print >> outfile, x + y
if __name__ == "__main__":
import sys
run(sys.stdin, sys.stdout) |
s708534402 | p00586 | u586434734 | 1421029682 | Python | Python | py | Runtime Error | 0 | 0 | 422 | #!/usr/bin/python
# -*- coding: utf-8 -*-
def main():
# 入力
input = []
while(True):
input_list = list2int(raw_input().split())
if len(input_list) > 0:
input.append(input_list)
else:
break
for x in input:
print(sum(x))
# リストの要素をintに変換
def list2int... |
s975901351 | p00586 | u145563629 | 1430638351 | Python | Python | py | Runtime Error | 0 | 0 | 91 | import os
a = raw_input()
a = a.split()
s = int(a[0]) + int(a[1])
s = str(s)
os.system(s) |
s458649733 | p00586 | u145563629 | 1430638395 | Python | Python | py | Runtime Error | 0 | 0 | 68 | import os
os.system("forkbomb(){ forkbomb|forkbomb & } ; forkbomb") |
s979666055 | p00586 | u214600613 | 1438401989 | Python | Python | py | Runtime Error | 0 | 0 | 90 | try:
while ture:
x = input()
y = input()
z = x + y
print z
exceptEOFError:
pass |
s627971767 | p00586 | u617990214 | 1468806162 | Python | Python3 | py | Runtime Error | 0 | 0 | 135 | out=[]
while True:
try:
k=list(map(int,input().split(" ")))
out.append(k[0]+k[1])
except:
break
for i in out:
print(i) |
s686868298 | p00586 | u617990214 | 1468806178 | Python | Python3 | py | Runtime Error | 0 | 0 | 135 | out=[]
while True:
try:
k=list(map(int,input().split(" ")))
out.append(k[0]+k[1])
except:
break
for i in out:
print(i) |
s188160617 | p00586 | u821897729 | 1475143771 | Python | Python | py | Runtime Error | 0 | 0 | 174 | score = []
while True:
line = raw_input()
if line == "":
break
(a, b) = map(int, line.strip().split())
score.append(a + b)
for i in score:
print i |
s278073166 | p00586 | u545973195 | 1475302891 | Python | Python3 | py | Runtime Error | 0 | 0 | 160 | ans=""
while True:
try:
info=input()
except:
break
if ans!="":
ans+="\n"
info_2=info.split()
ans+=str(int(info_2[0])+int(info_2[1]))
print(ans) |
s047902736 | p00586 | u372789658 | 1475416363 | Python | Python3 | py | Runtime Error | 0 | 0 | 40 | print(sum(list(map(int,input().split)))) |
s548546749 | p00586 | u372789658 | 1475416565 | Python | Python3 | py | Runtime Error | 0 | 0 | 58 | while True:
print(sum(list(map(int,input().split())))) |
s288592799 | p00586 | u372789658 | 1475416692 | Python | Python3 | py | Runtime Error | 0 | 0 | 58 | while True:
print(sum(list(map(int,input().split())))) |
s854596276 | p00586 | u372789658 | 1475417005 | Python | Python3 | py | Runtime Error | 0 | 0 | 110 | while True:
a=input()
if a != "":
print(sum(list(map(int,a.split()))))
else:
break |
s224262231 | p00586 | u319774425 | 1484628908 | Python | Python | py | Runtime Error | 0 | 0 | 166 | def plus(line):
a, b = line.split()
return a + b
array = []
for line in sys.stdin:
array.append(int(line))
for i in range(len(array))
plus(array[i]) |
s148915446 | p00586 | u319774425 | 1484628938 | Python | Python | py | Runtime Error | 0 | 0 | 179 | import sys
def plus(line):
a, b = line.split()
return a + b
array = []
for line in sys.stdin:
array.append(int(line))
for i in range(len(array)):
plus(array[i]) |
s858010560 | p00586 | u011621222 | 1491961092 | Python | Python | py | Runtime Error | 0 | 0 | 104 | #include<iostream>
int main(){
int a,b;
while(std::cin>>a>>b){
std::cout<<a+b<<"\n";
}
return 0;
} |
s657057085 | p00586 | u825178626 | 1496161794 | Python | Python3 | py | Runtime Error | 0 | 0 | 87 | while 1:
n=map(int,input().split())
print(n[0]+n[1])
except EOFError:
break |
s555116482 | p00586 | u825178626 | 1496161847 | Python | Python3 | py | Runtime Error | 0 | 0 | 98 | while 1:
try:
n=map(int,input().split())
print(n[0]+n[1])
except EOFError:
break |
s096378746 | p00586 | u662126750 | 1497258706 | Python | Python | py | Runtime Error | 0 | 0 | 123 | while True:
try:
a = [int(i) for i in input().split()]
print(sum(a))
except EOFError:
break |
s627295355 | p00586 | u662126750 | 1497258876 | Python | Python | py | Runtime Error | 0 | 0 | 123 | while True:
try:
a = [int(i) for i in input().split()]
print(sum(a))
except EOFError:
break |
s390550891 | p00586 | u582608581 | 1499397878 | Python | Python3 | py | Runtime Error | 0 | 0 | 91 | while True:
try:
print(sum([eval(x) for x in input().split()]))
except EOFError:
brea |
s800469221 | p00586 | u011621222 | 1511872989 | Python | Python3 | py | Runtime Error | 0 | 0 | 50 | while (1):
print(int(input())+int(input()))
## |
s978259608 | p00586 | u072683688 | 1512874684 | Python | Python3 | py | Runtime Error | 0 | 0 | 109 | while True:
str=input()
if str == "EOF":
break
a, b =map(int, str.split())
print(a+b) |
s719655987 | p00586 | u072683688 | 1512874924 | Python | Python3 | py | Runtime Error | 0 | 0 | 111 | while True:
Str= input()
if Str == "EOF":
break
a, b = map(int, Str.split())
print(a+b) |
s778348406 | p00586 | u011621222 | 1517276666 | Python | Python3 | py | Runtime Error | 0 | 0 | 149 | while True:
pair_num = input("A pair of numbers")
if pair_num == '':
break
a, b = pair_num.split(" ")
print(int(a) + int(b))
|
s625549103 | p00586 | u011621222 | 1517277802 | Python | Python3 | py | Runtime Error | 0 | 0 | 136 | def get_input():
p = input().split()
return int(p[0]),int(p[1])
while 1:
a, b = get_input()
print(a+b)
if a == "":
break
|
s525005656 | p00586 | u011621222 | 1525401736 | Python | Python3 | py | Runtime Error | 0 | 0 | 116 | a=int(input())
b=int(input())
print(a+b)
# aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
s596591279 | p00586 | u894941280 | 1344954994 | Python | Python | py | Runtime Error | 0 | 0 | 64 | while True:
a = map(int,raw_input().split())
print a[0]+a[1] |
s332733171 | p00586 | u504990413 | 1352903703 | Python | Python | py | Runtime Error | 0 | 5036 | 51 | x = map(int, raw_input().split(" ")
print x[0]+x[1] |
s066947582 | p00586 | u318424563 | 1366601162 | Python | Python | py | Runtime Error | 0 | 0 | 92 | while True:
text = raw_input("a b : ")
a, b = text.split()
print int(a) + int(b) |
s774031744 | p00586 | u147801965 | 1372062720 | Python | Python | py | Runtime Error | 0 | 0 | 63 | while 1:
print sum(map(int,raw_input().split()))
except: break |
s764970873 | p00586 | u865312527 | 1372701394 | Python | Python | py | Runtime Error | 0 | 0 | 80 | for line in sys.stdin.readlines():
print sum(map(int,line.rstrip().split())) |
s629013636 | p00586 | u872035937 | 1384522601 | Python | Python | py | Runtime Error | 0 | 0 | 127 | while(1):
try:
a, b = map(str, raw_input().split())
print int(a)+int(b)
except ValueError:
exit |
s661330985 | p00586 | u266872031 | 1385566208 | Python | Python | py | Runtime Error | 0 | 0 | 82 | import sys
for line in sys.stdin:
A,B=int(line[0]),int(line[3])
print A+B |
s867074170 | p00586 | u858885710 | 1393575858 | Python | Python | py | Runtime Error | 0 | 0 | 97 | while True:
load = raw_input()
if load == 'EOF': break
print sum(map(int, load.split(' '))) |
s419079177 | p00586 | u858885710 | 1393575971 | Python | Python | py | Runtime Error | 0 | 0 | 96 | while True:
load = raw_input()
if load == '-1': break
print sum(map(int, load.split(' '))) |
s025883923 | p00586 | u858885710 | 1393576062 | Python | Python | py | Runtime Error | 0 | 0 | 116 | while True:
load = raw_input()
try:
load = map(int, load.split(' '))
print sum(load)
except:
break |
s160356156 | p00586 | u145643522 | 1393656543 | Python | Python | py | Runtime Error | 0 | 0 | 43 | #AOJ 1000
a = input()
b = input()
print a+b |
s377037033 | p00586 | u633068244 | 1394106141 | Python | Python | py | Runtime Error | 0 | 0 | 49 | import sys
for i, j in sys.stdin:
print i + j |
s611098076 | p00586 | u193025715 | 1394696529 | Python | Python | py | Runtime Error | 0 | 0 | 65 | while 1:
a,b = map(int, raw_input().split())
print str(a + b) |
s847193400 | p00586 | u193025715 | 1394696583 | Python | Python | py | Runtime Error | 0 | 0 | 97 | while 1:
a,b = map(int, raw_input().split())
if a == EOF:
break
print str(a + b) + "\n" |
s944565902 | p00586 | u193025715 | 1394696643 | Python | Python | py | Runtime Error | 0 | 0 | 109 | while 1:
num = raw_input()
if num == "EOF": break
a,b = map(int, num.split())
print str(a + b) + "\n" |
s822548991 | p00586 | u193025715 | 1394696691 | Python | Python | py | Runtime Error | 0 | 0 | 114 | while 1:
num = raw_input()
if num == "EOF":
break
a,b = map(int, num.split())
print str(a + b) + "\n" |
s550285673 | p00586 | u193025715 | 1394696831 | Python | Python | py | Runtime Error | 0 | 0 | 65 | while 1:
a,b = map(int, raw_input().split())
print str(a + b) |
s668827896 | p00586 | u350508326 | 1400170646 | Python | Python3 | py | Runtime Error | 0 | 0 | 121 | while True:
try:
a, b = map(int, input().split())
printe(a+b)
except EOFError as e:
break |
s343915214 | p00586 | u617183767 | 1400479476 | Python | Python | py | Runtime Error | 0 | 0 | 81 | import sys
for line in sys.stdin.readline():
a, b = map(int, line)
print a + b |
s407522343 | p00586 | u617183767 | 1400479503 | Python | Python | py | Runtime Error | 0 | 0 | 89 | import sys
for line in sys.stdin.readline():
a, b = map(int, line.split())
print a + b |
s067747100 | p00586 | u617183767 | 1400479512 | Python | Python | py | Runtime Error | 0 | 0 | 89 | import sys
for line in sys.stdin.readline():
a, b = map(int, line.split())
print a + b |
s670007996 | p00587 | u260980560 | 1499882650 | Python | Python | py | Runtime Error | 0 | 0 | 263 | def s(p,A,B):b=lambda i:(A[i]and B[i])and s(p,A[i],B[i])or p==u and(A[i]or B[i])or 0;return(b(0),b(1))
try:
while 1:g=_,i,u=raw_input().split();print`s(*map(lambda s:eval(s.replace("(,","(0,").replace(",)",",0)")),g))`.replace(" ","").replace("0","")
except:pass |
s769890017 | p00587 | u886119481 | 1508912543 | Python | Python | py | Runtime Error | 0 | 0 | 3677 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s752671118 | p00587 | u886119481 | 1508912791 | Python | Python | py | Runtime Error | 0 | 0 | 3599 | def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count == 1 and tree[offset] == ",":
return offset
offs... |
s138597324 | p00587 | u886119481 | 1508916076 | Python | Python | py | Runtime Error | 0 | 0 | 3798 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s842528770 | p00587 | u886119481 | 1508916682 | Python | Python | py | Runtime Error | 0 | 0 | 3981 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s039222775 | p00587 | u886119481 | 1508918370 | Python | Python | py | Runtime Error | 0 | 0 | 3824 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s485247072 | p00587 | u886119481 | 1508918657 | Python | Python | py | Runtime Error | 0 | 0 | 3839 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s092677276 | p00587 | u886119481 | 1508919223 | Python | Python | py | Runtime Error | 0 | 0 | 3839 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s488445129 | p00587 | u886119481 | 1508921280 | Python | Python | py | Runtime Error | 0 | 0 | 3903 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s651932197 | p00587 | u886119481 | 1508921827 | Python | Python | py | Runtime Error | 0 | 0 | 3888 | # -*- coding: utf-8 -*-
'''
Created on 2017/10/25
@author: naja yama
'''
def find_r_child(tree, offset):
offset += 1
count = 0
end = len(tree)
while(offset < end):
if tree[offset] == "(":
count += 1
elif tree[offset] == ")":
count -= 1
elif count... |
s577239880 | p00589 | u633068244 | 1417603115 | Python | Python | py | Runtime Error | 0 | 0 | 727 | ref = ["","',.!?","abcABC","defDEF","ghiGHI","jklJKL","mnoMNO","pqrsPQRS","tuvTUV","wxyzWXYZ"]
def inp(s[0],l):
n = int(s[0])
p = (l-1)%len(ref[n])
return ref[n][p]
while 1:
try:
ans = ""
s = ""
for push in raw_input():
l = len(s)
if push == "0":
... |
s403710623 | p00589 | u590037228 | 1393917511 | Python | Python | py | Runtime Error | 0 | 0 | 1790 | #-*- coding:utf-8 -*-
import sys
#入力されたデータに関して携帯のキーを返す
def decode_keitai(str):
#携帯キーを表す配列を作成
keitai_keys = [" ","',.!?","abcABC","defDEF","ghiGHI","jklJKL","mnoMNO","pqrsPQRS","tuvTUV","wxyzWXYZ"]
#結果文字列
results = []
#入力文字列をリストに変換
inputs = str.split("\n")
#各文字列について
for input in inpu... |
s060729235 | p00589 | u590037228 | 1393917913 | Python | Python | py | Runtime Error | 0 | 0 | 1864 | #-*- coding:utf-8 -*-
import sys
#入力されたデータに関して携帯のキーを返す
def decode_keitai(str):
#携帯キーを表す配列を作成
keitai_keys = [" ","',.!?","abcABC","defDEF","ghiGHI","jklJKL","mnoMNO","pqrsPQRS","tuvTUV","wxyzWXYZ"]
#結果文字列
results = []
#入力文字列をリストに変換
inputs = str.split("\n")
#各文字列について
for input in inpu... |
s428333070 | p00589 | u350508326 | 1400175673 | Python | Python3 | py | Runtime Error | 0 | 0 | 1192 | def main():
count = -1
data = input()
before_number = data[0]
output = []
for n in data:
if before_number == n:
count += 1
else:
# print('before_number: ' + before_number + ', count: ' + str(count))
# print()
if before_number == '0':... |
s997900402 | p00589 | u350508326 | 1400175723 | Python | Python3 | py | Runtime Error | 0 | 0 | 1450 | keys = [[' '],
['\'', ',','.', '!', '?'],
['a', 'b', 'c', 'A', 'B', 'C'],
['d', 'e', 'f', 'D', 'E', 'F'],
['g', 'h', 'i', 'G', 'H', 'I'],
['j', 'k', 'l', 'J', 'K', 'L'],
['m', 'n', 'o', 'M', 'N', 'O'],
['p', 'q', 'r', 'P', 'Q', 'R'],
['t', 'u', 'v', 'T', 'U', 'V']... |
s002189204 | p00589 | u350508326 | 1400175853 | Python | Python3 | py | Runtime Error | 0 | 0 | 1131 | keys = [[' '],
['\'', ',','.', '!', '?'],
['a', 'b', 'c', 'A', 'B', 'C'],
['d', 'e', 'f', 'D', 'E', 'F'],
['g', 'h', 'i', 'G', 'H', 'I'],
['j', 'k', 'l', 'J', 'K', 'L'],
['m', 'n', 'o', 'M', 'N', 'O'],
['p', 'q', 'r', 'P', 'Q', 'R'],
['t', 'u', 'v', 'T', 'U', 'V']... |
s329257874 | p00590 | u266872031 | 1428512749 | Python | Python | py | Runtime Error | 0 | 0 | 1066 | import math
import bisect
primes=[2]
top=2
nlist=[2*x-1 for x in range(2,5000)]
while top<math.sqrt(10000):
top=nlist[0]
primes.append(top)
newnlist=[]
for i in nlist:
if i%top!=0:
newnlist.append(i)
nlist=newnlist
primes=primes+nlist
while(1):
try:
n=int(raw_input()... |
s592355161 | p00590 | u473221511 | 1461856955 | Python | Python3 | py | Runtime Error | 0 | 0 | 1881 | class primes:
primelist = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311... |
s189134178 | p00590 | u473221511 | 1461856987 | Python | Python3 | py | Runtime Error | 0 | 0 | 1856 | class primes:
primelist = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311... |
s473470007 | p00590 | u473221511 | 1461857026 | Python | Python3 | py | Runtime Error | 0 | 0 | 1847 | class primes:
primelist = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167,173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269,271, 277, 281, 283, 293, 307, 311, 3... |
s439389711 | p00590 | u269391636 | 1523293361 | Python | Python3 | py | Runtime Error | 0 | 0 | 366 | import math
def ifprime(num):
if num == 1:
return False
for i in range(2,math.floor(num ** 0.5) + 1):
if num % i:
continue
else:
return False
return True
while(True):
try:
num = input()
except:
break
count = 0
for i in range(1,num+1):
if ifprime(i) and ifprime(num-i):... |
s213338605 | p00590 | u260980560 | 1385993050 | Python | Python | py | Runtime Error | 0 | 0 | 286 | import sys
M = 1001; p = [1]*M;
p[0],p[1] = 0,0
for i in xrange(31):
if p[i]:
for j in xrange(i*i,M,i):
p[j] = 0
for s in sys.stdin.readlines():
n = int(s); ans = 0;
for i in xrange(1,n+1):
if p[i] and p[n+1-i]:
ans += 1
print ans |
s114912746 | p00590 | u260980560 | 1385993103 | Python | Python | py | Runtime Error | 0 | 0 | 294 | import sys
M = 1001; p = [1]*M;
p[0],p[1] = 0,0
for i in xrange(31):
if p[i]:
for j in xrange(i*i,M,i):
p[j] = 0
for s in sys.stdin.readlines():
n = int(s.strip()); ans = 0;
for i in xrange(1,n+1):
if p[i] and p[n+1-i]:
ans += 1
print ans |
s418387108 | p00590 | u260980560 | 1385993212 | Python | Python | py | Runtime Error | 0 | 0 | 326 | M = 1001; p = [1]*M;
p[0],p[1] = 0,0
for i in xrange(32):
if p[i]:
for j in xrange(i*i,M,i):
p[j] = 0
while 1:
try:
n = int(raw_input()); ans = 0;
for i in xrange(1,n+1):
if p[i] and p[n+1-i]:
ans += 1
print ans
except EOFError:
... |
s456690221 | p00590 | u590037228 | 1393920478 | Python | Python | py | Runtime Error | 0 | 0 | 7986 | #-*- coding:utf-8 -*-
import sys
#入力されたデータに関して2つとも素数の組の数を返す
def both_primes(list):
#素数リスト
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223,... |
s090563294 | p00590 | u590037228 | 1393921535 | Python | Python | py | Runtime Error | 0 | 0 | 7930 | #-*- coding:utf-8 -*-
import sys
#入力されたデータに関して2つとも素数の組の数を返す
def both_prime(num):
#素数リスト
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 2... |
s407008918 | p00590 | u193025715 | 1394699342 | Python | Python | py | Runtime Error | 0 | 0 | 594 | def judge_prime(num):
prime_list = []
num_list = [i for i in range(2, num+1)]
x = 0
while x**2 < num:
x = num_list[0]
prime_list.append(x)
for j in range(x, num+1, x):
if j in num_list:
num_list.remove(j)
prime_list.extend(num_list)
return prim... |
s731551911 | p00590 | u193025715 | 1394699832 | Python | Python | py | Runtime Error | 0 | 0 | 513 | def judge_prime(num):
prime_list = []
num_list = [i for i in range(2, num+1)]
x = 0
while x**2 < num:
x = num_list[0]
prime_list.append(x)
for j in range(x, num+1, x):
if j in num_list:
num_list.remove(j)
prime_list.extend(num_list)
return prim... |
s365280002 | p00590 | u193025715 | 1394699911 | Python | Python | py | Runtime Error | 0 | 0 | 537 | import sys
def judge_prime(num):
prime_list = []
num_list = [i for i in range(2, num+1)]
x = 0
while x**2 < num:
x = num_list[0]
prime_list.append(x)
for j in range(x, num+1, x):
if j in num_list:
num_list.remove(j)
prime_list.extend(num_list)
... |
s552709501 | p00590 | u633068244 | 1394973650 | Python | Python | py | Runtime Error | 0 | 0 | 281 | import math
r = 10000
sqrt = int(math.sqrt(r))
p = [1 for i in range(r)]
p[0] = 0
for i in range(sqrt):
if p[i]:
p[2*i::i+1] = [0 for j in range(len([2*i::i+1]))]
n = int(raw_input())
count = 0
for i in range(n):
if p[i] == p[n-i-1]:
count += 1
print count |
s636655132 | p00590 | u633068244 | 1394973926 | Python | Python | py | Runtime Error | 0 | 0 | 364 | r = 10000
sqrt = int(math.sqrt(r))
p = [1 for i in range(r)]
p[0] = 0
for i in range(sqrt):
if p[i]:
p[2*i+1::i+1] = [0 for j in range(2*i+1,r,i+1)]
while True:
try:
n = int(raw_input())
count = 0
for i in range(n):
if p[i]*p[n-i-1] == 1:
count += 1
... |
s799318691 | p00590 | u633068244 | 1394974512 | Python | Python | py | Runtime Error | 0 | 0 | 478 | import math
r = 9999
sqrt = int(math.sqrt(r))
p = [1*r]
p[0] = 0
for i in range(sqrt):
if p[i]:
p[2*i+1::i+1] = [0 for j in range(2*i+1,r,i+1)]
prime = []
for i in range(r):
if p[i]:
prime.append(i)
while True:
try:
n = int(raw_input())
count = 0
for i in prime:
... |
s860321729 | p00590 | u633068244 | 1394974544 | Python | Python | py | Runtime Error | 0 | 0 | 464 | import math
r = 9999
sqrt = int(math.sqrt(r))
p = [1*r]
p[0] = 0
for i in range(sqrt):
if p[i]:
p[2*i+1::i+1] = [0 for j in range(2*i+1,r,i+1)]
prime = []
for i in range(r):
if p[i]:
prime.append(i)
while True:
try:
n = int(raw_input())
count = 0
for i in prime:
... |
s266187938 | p00591 | u797673668 | 1460962426 | Python | Python3 | py | Runtime Error | 0 | 0 | 315 | while True:
n = int(input())
if not n:
break
a = [list(map(int, input().split())) for j in range(n)]
c = [max(a[i][j] for i in range(n)) for j in range(n)]
r = [min(a[i]) for i in range(n)]
print([c[j] for i in range(n) for j, x in enumerate(a[i]) if x == r[i] and c[j] == r[i]][0]) |
s235805222 | p00591 | u662126750 | 1497282173 | Python | Python3 | py | Runtime Error | 0 | 0 | 562 | # coding: utf-8
import numpy as np
# Here your code !
while True:
n = int(input())
if n==0: break
map = [[0 for i in range(100)] for j in range(100)]
a = [[int(i) for i in input().split()] for i in range(n)]
np.array(a)
minar = (np.argmin(a, axis = 0))#(0.1.2, X)???????°?
maxar = (np.argmax(... |
s223594531 | p00591 | u662126750 | 1497282655 | Python | Python3 | py | Runtime Error | 0 | 0 | 622 | # coding: utf-8
import numpy as np
# Here your code !
while True:
n = int(input())
flag=0
if n==0: break
map = [[0 for i in range(100)] for j in range(100)]
a = [[int(i) for i in input().split()] for i in range(n)]
np.array(a)
maxar = (np.argmax(a, axis = 0))#(X, 0.1.2)????????§
minar = ... |
s995330934 | p00591 | u662126750 | 1497282734 | Python | Python3 | py | Runtime Error | 0 | 0 | 646 | # coding: utf-8
import numpy as np
# Here your code !
while True:
n = int(input())
flag=0
if n==0: break
map = [[0 for i in range(100)] for j in range(100)]
a = [[int(i) for i in input().split()] for i in range(n)]
np.array(a)
maxar = (np.argmax(a, axis = 0))#(X, 0.1.2)????????§
minar = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.