s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s598294517 | p02439 | u255317651 | 1529846752 | Python | Python3 | py | Runtime Error | 0 | 0 | 94 | a, b, c = list(map(int, input().splist()))
print('{} {}'.format(min([a,b,c], max([a,b,c]))))
| Traceback (most recent call last):
File "/tmp/tmpy119x7sl/tmp8d8ue2nl.py", line 1, in <module>
a, b, c = list(map(int, input().splist()))
^^^^^^^
EOFError: EOF when reading a line
| |
s743971044 | p02439 | u255317651 | 1529846772 | Python | Python3 | py | Runtime Error | 0 | 0 | 93 | a, b, c = list(map(int, input().split()))
print('{} {}'.format(min([a,b,c], max([a,b,c]))))
| Traceback (most recent call last):
File "/tmp/tmphf1i30ap/tmpfen67uz_.py", line 1, in <module>
a, b, c = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s909071025 | p02439 | u255317651 | 1529846819 | Python | Python3 | py | Runtime Error | 0 | 0 | 92 | a, b, c = list(map(int, input().split()))
print('{} {}'.format(min([a,b,c], max([a,b,c])))
| File "/tmp/tmp3wk26c7k/tmp7y0ivgwm.py", line 2
print('{} {}'.format(min([a,b,c], max([a,b,c])))
^
SyntaxError: '(' was never closed
| |
s052268629 | p02440 | u126478680 | 1527307895 | Python | Python3 | py | Runtime Error | 0 | 0 | 424 | n = int(input())
nums = list(map(int, input().split(' ')))
q = int(input())
for i in range(q):
op = list(map(int, input().split(' ')))
if op[0] == 0:
min = float('inf')
for num in nums[op[1], op[2]]:
if num < min: min = num
print(min)
elif op[0] == 1:
max = -flo... | Traceback (most recent call last):
File "/tmp/tmpvq4wmh7l/tmp0jyv2w2u.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s803468112 | p02442 | u255317651 | 1530346644 | Python | Python3 | py | Runtime Error | 0 | 0 | 328 | n = int(input())
a = list(map(int, input().split())
m = int(input())
b = list(map(int, input()))
la = len(a)
lb = len(b)
l = min(la, lb)
for i in range(l):
if a[i] < b[i]:
print(1)
break
elif a[i] > b[i]:
print(2)
break
else:
if la < lb:
print(1)
else:
p... | File "/tmp/tmpg_b6ikhj/tmptidgmo83.py", line 2
a = list(map(int, input().split())
^
SyntaxError: '(' was never closed
| |
s373130936 | p02456 | u126478680 | 1527351195 | Python | Python3 | py | Runtime Error | 30 | 5600 | 321 | numset = set([])
q = int(input())
for i in range(q):
query, x = list(map(int, input().split(' ')))
if query == 0:
numset.add(x)
print(len(numset))
elif query == 1:
if set([x]).issubset(numset):
print(1)
else:
print(0)
else:
numset.remove(x)... | Traceback (most recent call last):
File "/tmp/tmpnfbjp_qm/tmpb_8lml1u.py", line 2, in <module>
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s841033671 | p02456 | u548155360 | 1529926605 | Python | Python3 | py | Runtime Error | 20 | 5596 | 317 | # coding=utf-8
Q = int(input())
S = set()
for i in range(Q):
qtype, number = map(int, input().split())
if qtype == 0:
S.add(number)
print(len(S))
if qtype == 1:
if number in S:
print(1)
else:
print(0)
if qtype == 2:
S.remove(number)
| Traceback (most recent call last):
File "/tmp/tmp5nejdmbd/tmp9zetvc5r.py", line 3, in <module>
Q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s946096907 | p02456 | u548155360 | 1529926665 | Python | Python3 | py | Runtime Error | 20 | 5596 | 321 | # coding=utf-8
Q = int(input())
S = set()
for i in range(Q):
qtype, number = map(int, input().split())
if qtype == 0:
S.add(number)
print(len(S))
elif qtype == 1:
if number in S:
print(1)
else:
print(0)
elif qtype == 2:
S.remove(number)
... | Traceback (most recent call last):
File "/tmp/tmp46muekxx/tmp972hou9b.py", line 3, in <module>
Q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s341407291 | p02457 | u542431833 | 1559190604 | Python | Python3 | py | Runtime Error | 0 | 0 | 1553 | def binary(l,c,low,index):
fst = 0
last = len(l)
mid = int(last/2)
if fst == 0 and last ==0:
l.insert(0,c)
for i in range(len(index)):
if low[i] > c:
index[i] += 1
return
while fst < last:
mid = int((fst+last) / 2)
if l[mid] == c:
... | File "/tmp/tmp8dyte_yo/tmpx05b0azt.py", line 57
if index[0] < len(S)1:
^
SyntaxError: invalid syntax
| |
s019928341 | p02457 | u126478680 | 1527364468 | Python | Python3 | py | Runtime Error | 0 | 0 | 446 |
q = int(input())
for i in range(q):
q, *val = list(map(int, input().split(' ')))
if q == 0:
numset.add(val[0])
print(len(numset))
elif q == 1:
rst = 1 if set(val).issubset(numset) else 0
print(rst)
elif q == 2:
if val[0] in numset: numset.remove(val[0])
elif ... | Traceback (most recent call last):
File "/tmp/tmpkvcjcch3/tmp160pp8mb.py", line 2, in <module>
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s017215090 | p02457 | u126478680 | 1527394103 | Python | Python3 | py | Runtime Error | 2770 | 15632 | 534 | numset = set([])
q = int(input())
for i in range(q):
q, *val = list(map(int, input().split(' ')))
if q == 0:
numset.add(val[0])
print(len(numset))
elif q == 1:
rst = 1 if val[0] in numset else 0
print(rst)
elif q == 2:
if val[0] in numset: numset.remove(val[0])
... | Traceback (most recent call last):
File "/tmp/tmprwlhoxvq/tmpx6c2_hbs.py", line 3, in <module>
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s024034985 | p02457 | u548155360 | 1529927094 | Python | Python3 | py | Runtime Error | 2520 | 15892 | 531 | # coding=utf-8
Q = int(input())
S = set()
for i in range(Q):
query = list(map(int, input().split()))
if query[0] == 0:
S.add(query[1])
print(len(S))
elif query[0] == 1:
if query[1] in S:
print(1)
else:
print(0)
elif query[0] == 2:
try:
... | Traceback (most recent call last):
File "/tmp/tmpk3t8e8k1/tmpvvl4jmnc.py", line 3, in <module>
Q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s509366525 | p02457 | u548155360 | 1529927333 | Python | Python3 | py | Runtime Error | 2470 | 15884 | 531 | # coding=utf-8
Q = int(input())
S = set()
for i in range(Q):
query = list(map(int, input().split()))
if query[0] == 0:
S.add(query[1])
print(len(S))
elif query[0] == 1:
if query[1] in S:
print(1)
else:
print(0)
elif query[0] == 2:
try:
... | Traceback (most recent call last):
File "/tmp/tmphg3zomtu/tmpiopb_b05.py", line 3, in <module>
Q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s495265950 | p02457 | u138546245 | 1530065387 | Python | Python3 | py | Runtime Error | 0 | 0 | 4851 |
class BinarySearchTree:
class Node:
__slots__ = ('key', 'left', 'right', 'count')
def __init__(self, key):
self.key = key
self.left = None
self.right = None
self.count = 0
def __str__(self):
return "{}, {} ({}, {})".format(self.k... | Traceback (most recent call last):
File "/tmp/tmp0aoub2zh/tmpdr8_oeri.py", line 161, in <module>
from Set import BstSet
ModuleNotFoundError: No module named 'Set'
| |
s044525834 | p02457 | u138546245 | 1530067775 | Python | Python3 | py | Runtime Error | 5980 | 16404 | 5015 | class BinarySearchTree:
class Node:
__slots__ = ('key', 'left', 'right', 'count')
def __init__(self, key):
self.key = key
self.left = None
self.right = None
self.count = 0
def __str__(self):
return "{}, {} ({}, {})".format(self.... | Traceback (most recent call last):
File "/tmp/tmp5uixsgfj/tmpezvy41bj.py", line 183, in <module>
run()
File "/tmp/tmp5uixsgfj/tmpezvy41bj.py", line 160, in run
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s147798863 | p02457 | u138546245 | 1530526602 | Python | Python3 | py | Runtime Error | 40 | 6528 | 13038 |
from enum import Enum
import math
class Color(Enum):
BLACK = 0
RED = 1
@staticmethod
def flip(c):
return [Color.RED, Color.BLACK][c.value]
class RedBlackBinarySearchTree:
"""Red Black Binary Search Tree with range, min, max.
"""
class Node:
__slots__ = ('key', 'left', ... | Traceback (most recent call last):
File "/tmp/tmpmvcy6h3c/tmpzouqntxo.py", line 429, in <module>
run()
File "/tmp/tmpmvcy6h3c/tmpzouqntxo.py", line 406, in run
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s892361203 | p02457 | u138546245 | 1530526979 | Python | Python3 | py | Runtime Error | 10200 | 7260 | 13085 |
from enum import Enum
import math
class Color(Enum):
BLACK = 0
RED = 1
@staticmethod
def flip(c):
return [Color.RED, Color.BLACK][c.value]
class RedBlackBinarySearchTree:
"""Red Black Binary Search Tree with range, min, max.
"""
class Node:
__slots__ = ('key', 'left', ... | Traceback (most recent call last):
File "/tmp/tmpij93a82o/tmpb5p0m8if.py", line 431, in <module>
run()
File "/tmp/tmpij93a82o/tmpb5p0m8if.py", line 408, in run
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s960723656 | p02460 | u126478680 | 1527353223 | Python | Python3 | py | Runtime Error | 20 | 5600 | 232 | dict = {}
q = int(input())
for i in range(q):
query, *val = input().split(' ')
if query == '0':
dict[val[0]] = int(val[1])
elif query == '1':
print(dict.get(val[0], 0))
else:
dict.pop(val[0])
| Traceback (most recent call last):
File "/tmp/tmpv99heu9g/tmp4eghfx_s.py", line 2, in <module>
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s158441440 | p02461 | u138546245 | 1530866062 | Python | Python3 | py | Runtime Error | 8920 | 7404 | 11391 |
from enum import Enum
class Color(Enum):
BLACK = 0
RED = 1
@staticmethod
def flip(c):
return [Color.RED, Color.BLACK][c.value]
class Node:
__slots__ = ('key', 'left', 'right', 'size', 'color', 'value')
def __init__(self, key, value):
self.key = key
self.value = val... | Traceback (most recent call last):
File "/tmp/tmpj18x70k4/tmpcntneans.py", line 416, in <module>
run()
File "/tmp/tmpj18x70k4/tmpcntneans.py", line 386, in run
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s876358954 | p02461 | u138546245 | 1530866439 | Python | Python3 | py | Runtime Error | 0 | 0 | 11287 | from enum import Enum
class Color(Enum):
BLACK = 0
RED = 1
@staticmethod
def flip(c):
return [Color.RED, Color.BLACK][c.value]
class Node:
__slots__ = ('key', 'left', 'right', 'size', 'color', 'value')
def __init__(self, key, value):
self.key = key
self.value ... | Traceback (most recent call last):
File "/tmp/tmp3k75xrqa/tmpfeao45w_.py", line 409, in <module>
run()
File "/tmp/tmp3k75xrqa/tmpfeao45w_.py", line 379, in run
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s016518071 | p02467 | u870370075 | 1556379615 | Python | Python3 | py | Runtime Error | 0 | 0 | 307 | def fact(num):
ret=[]
if num==2:
ret=[2]
return ret
elif num==3:
ret=[2,3]
return ret
while 1:
for i in range(2,int(num**0.5)+1):
if num%i==0:
ret.append(i)
num=num%i
break
n=int(input())
ans=fact(n)
print('{}: {}'.format(n,' '.join(map(str,ans)))
| File "/tmp/tmp3yp80r5m/tmpwhm7psmb.py", line 18
print('{}: {}'.format(n,' '.join(map(str,ans)))
^
SyntaxError: '(' was never closed
| |
s964570986 | p02467 | u870370075 | 1556379689 | Python | Python3 | py | Runtime Error | 0 | 0 | 332 | def fact(num):
ret=[]
if num==2:
ret=[2]
return ret
elif num==3:
ret=[2,3]
return ret
while 1:
for i in range(2,int(num**0.5)+1):
if num%i==0:
ret.append(i)
num=num%i
break
else:
break
n=int(input())
ans=fact(n)
print('{}: {}'.format(n,' '.join(map(... | Traceback (most recent call last):
File "/tmp/tmpnqtpujvy/tmpwx354jv_.py", line 18, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s917925411 | p02467 | u811434779 | 1442858228 | Python | Python | py | Runtime Error | 0 | 0 | 198 | n = input()
l = []
l += [str(n) + ":"]
while 1:
if n == 1:break
for i in count(2):
if n % i == 0:
n /= i
l += [i]
break
print " ".join(map(str,l)) | File "/tmp/tmp7w8ivo6n/tmp_07gr4mm.py", line 11
print " ".join(map(str,l))
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s574592047 | p02467 | u508732591 | 1482060025 | Python | Python3 | py | Runtime Error | 20 | 7544 | 326 | def factorize(n):
p = n
while True:
if p % 2 == 0:
p //= 2
yield 2
else:
break
r = 3
while p != 1:
if p % i == 0:
p //= i
yield i
else:
r += 2
n = int(input())
l = factorize(n)
print(str(n)+":",*li... | Traceback (most recent call last):
File "/tmp/tmpwwidl86y/tmp08xn2wg3.py", line 18, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s504563320 | p02467 | u508732591 | 1482064297 | Python | Python3 | py | Runtime Error | 0 | 0 | 660 | import scala.io.StdIn.readInt
import scala.collection.mutable.ArrayBuffer
object Main {
def factorize(p:Int,d:Int,l:List[Int]):List[Int] = {
if(d >= Math.sqrt(p)+1) {
if(p != 1) p::l else l
} else {
if(p%d == 0)
factorize(p,d,d::l)
else if(d==2)
factorize(p,d+1,l)
els... | File "/tmp/tmpqp49fb_z/tmp9133swei.py", line 4
object Main {
^^^^
SyntaxError: invalid syntax
| |
s397005027 | p02467 | u508732591 | 1482330286 | Python | Python3 | py | Runtime Error | 0 | 0 | 184 | while True:
n,x = map(int,input().split())
if n==0 and x==0:
break
print( sum( len( range(max(i+1,x-i-n),min(n,(x-i+1)//2)) ) ) for i in range(1,min(n-1,x//3)) ) | Traceback (most recent call last):
File "/tmp/tmppjz5orka/tmpmle0rr1b.py", line 2, in <module>
n,x = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s091400301 | p02467 | u508732591 | 1482330456 | Python | Python3 | py | Runtime Error | 0 | 0 | 182 | while True:
n,x = map(int,input().split())
if n==0 and x==0:
break
print(sum( [ len(range(max(i+1,x-i-n),min(n,(x-i+1)//2))) for i in range(1,min(n-1,x//3)) ])) | Traceback (most recent call last):
File "/tmp/tmpxtxz9a40/tmp3opkk10s.py", line 2, in <module>
n,x = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s260594481 | p02467 | u508732591 | 1482330505 | Python | Python3 | py | Runtime Error | 0 | 0 | 182 | while True:
n,x = map(int,input().split())
if n==0 and x==0:
break
print(sum( [ len(range(max(i+1,x-i-n),min(n,(x-i+1)//2))) for i in range(1,min(n-1,x//3)) ])) | Traceback (most recent call last):
File "/tmp/tmpbevq6tag/tmpebt6fi20.py", line 2, in <module>
n,x = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s847852694 | p02467 | u546285759 | 1490774813 | Python | Python3 | py | Runtime Error | 20 | 7664 | 553 | def isPrime(x):
if x == 2:
return True
if x < 2 or x % 2 == 0:
return False
i = 3
xx = int(pow(x, 0.5))
while i <= xx:
if x % i == 0:
return False
i += 2
return True
n = int(input())
rx = int(pow(n, 0.5))
l = rx+1
ps = []
for i in range(n):
if is... | Traceback (most recent call last):
File "/tmp/tmp08b4znu3/tmpt9d0rvhr.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s815052168 | p02467 | u546285759 | 1490774910 | Python | Python3 | py | Runtime Error | 20 | 7848 | 567 | def isPrime(x):
if x == 2:
return True
if x < 2 or x % 2 == 0:
return False
i = 3
xx = int(pow(x, 0.5))
while i <= xx:
if x % i == 0:
return False
i += 2
return True
n = int(input())
rx = int(pow(n, 0.5))
l = rx+1
ps = []
for i in range(n):
if is... | Traceback (most recent call last):
File "/tmp/tmprz_hi4ho/tmpkilkwsg6.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s804813522 | p02467 | u546285759 | 1490775207 | Python | Python3 | py | Runtime Error | 20 | 7720 | 524 | def isPrime(x):
if x == 2:
return True
if x < 2 or x % 2 == 0:
return False
i = 3
xx = int(pow(x, 0.5))
while i <= xx:
if x % i == 0:
return False
i += 2
return True
n = int(input())
rx = int(pow(n, 0.5))
l = rx+1
ps = []
for i in range(n):
if is... | Traceback (most recent call last):
File "/tmp/tmpadf2_aju/tmp3k1ld0i6.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s756791294 | p02467 | u150984829 | 1516850561 | Python | Python3 | py | Runtime Error | 0 | 0 | 161 | p=lambda x:print(x,end=' ')
n=input():p(n+':')
n=int(n);s=n**.5
while n%2==0 and n>3:p(2);n//=2
d=3
while s>d and n>d:
if n%d==0:p(d);n//=d
else:d+=2
print(n)
| File "/tmp/tmpf0h0y2qg/tmpa7x3jygg.py", line 2
n=input():p(n+':')
^
SyntaxError: invalid syntax
| |
s626594293 | p02467 | u150984829 | 1516852030 | Python | Python3 | py | Runtime Error | 0 | 0 | 156 | p=lambda x:print(x,end=' ')
m=n=input();p(n+':')
n=int(n)
while n%2==0 and n>3:p(2);n//=2
d=3
while d*d<m and n>d:
if n%d>0:d+=2
else:p(d);n//=d
print(n)
| Traceback (most recent call last):
File "/tmp/tmpt81ayd89/tmpx9cro1m3.py", line 2, in <module>
m=n=input();p(n+':')
^^^^^^^
EOFError: EOF when reading a line
| |
s862813557 | p02467 | u126478680 | 1527069201 | Python | Python3 | py | Runtime Error | 0 | 0 | 412 | def simple_prime_factrize(x):
pfs = []
for y in range(2, math.ceil(math.sqrt(x))):
if x == 1: break
while True:
if x%y == 0:
pfs.append(y)
x = x/y
else:
break
if len(pfs) == 0:
pfs.append(x)
return pfs
n... | Traceback (most recent call last):
File "/tmp/tmpvfovdibn/tmp1aebn8eb.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s061460231 | p02467 | u445032255 | 1530255610 | Python | Python3 | py | Runtime Error | 20 | 5684 | 992 | import math
def make_primes(limit):
n = 0
primes = []
for k in range(2, math.floor(math.sqrt(limit))+1):
factor = 0
# 2以外の偶数は素数ではないので無視する
if k % 2 == 0 and k != 2:
continue
# 繰り返しの上限を対象の平方根にする
for divisor in range(2, math.floor(math.sqrt(k))+1):
... | Traceback (most recent call last):
File "/tmp/tmpnpnuevvf/tmplpt8xfl3.py", line 52, in <module>
main()
File "/tmp/tmpnpnuevvf/tmplpt8xfl3.py", line 27, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s038696364 | p02468 | u671297350 | 1535108589 | Python | Python3 | py | Runtime Error | 0 | 0 | 49 | print(pow(int(input()),int(input()),int(1e9+7)))
| Traceback (most recent call last):
File "/tmp/tmpv8z8r6n1/tmphpu_vp7a.py", line 1, in <module>
print(pow(int(input()),int(input()),int(1e9+7)))
^^^^^^^
EOFError: EOF when reading a line
| |
s436211584 | p02468 | u975539923 | 1457272340 | Python | Python | py | Runtime Error | 10 | 6436 | 95 | import math
s = map(int, raw_input().split())
print "%d" % (math.pow(s[0], s[1]) % 1000000007) | File "/tmp/tmpexf332cq/tmpicrxhdlv.py", line 4
print "%d" % (math.pow(s[0], s[1]) % 1000000007)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s958729647 | p02468 | u975539923 | 1457272366 | Python | Python | py | Runtime Error | 10 | 6460 | 95 | import math
s = map(int, raw_input().split())
print "%d" % (math.pow(s[0], s[1]) % 1000000007) | File "/tmp/tmp3u5fktaj/tmp8gagjye3.py", line 4
print "%d" % (math.pow(s[0], s[1]) % 1000000007)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s764018021 | p02468 | u203261375 | 1466999391 | Python | Python3 | py | Runtime Error | 0 | 0 | 61 | n,m = map(int, input().split())
a = n**m%1,000000007
print(a) | File "/tmp/tmpd1rwfx8u/tmpw97lt806.py", line 2
a = n**m%1,000000007
^^^^^^^^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
| |
s696498789 | p02468 | u866201769 | 1483967388 | Python | Python3 | py | Runtime Error | 0 | 0 | 109 | m=input()
n=input()
mod=1000000007
m = int(m)
n=int(n)
i=1
for x in range(0, n):
i *= m
i %= mod
print(i) | Traceback (most recent call last):
File "/tmp/tmpjbzpcpe_/tmp__pe2upr.py", line 1, in <module>
m=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s819093735 | p02468 | u866201769 | 1483967435 | Python | Python | py | Runtime Error | 0 | 0 | 109 | m=input()
n=input()
mod=1000000007
m = int(m)
n=int(n)
i=1
for x in range(0, n):
i *= m
i %= mod
print(i) | Traceback (most recent call last):
File "/tmp/tmprbhtfxtv/tmp228__9xs.py", line 1, in <module>
m=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s766994775 | p02468 | u711765449 | 1484410720 | Python | Python3 | py | Runtime Error | 0 | 0 | 391 | #include <stdio.h>
long long int pw(long long int x,long long int n){
long long int result = 1;
if(n > 0){
result = pw(x,n/2);
if(n % 2 == 0){
result = result * result;
}else{
result = (result * result)*x;
}
}
return result;
}
int main(){
long long int m;
long long int n;
scanf("... | File "/tmp/tmp4so0ra9t/tmpanktnd1g.py", line 2
long long int pw(long long int x,long long int n){
^^^^
SyntaxError: invalid syntax
| |
s946409979 | p02468 | u258386856 | 1492491483 | Python | Python | py | Runtime Error | 0 | 0 | 234 | def power(x, y):
answer = x
for i in range(y-1):
answer *= x
answer = answer % 1000000007
return answer
l = raw_input().split()
print power(int(l[0]), int(l[1])) | File "/tmp/tmp_2rubdte/tmpcjoq6saz.py", line 8
l = raw_input().split()
^
IndentationError: unindent does not match any outer indentation level
| |
s142559605 | p02468 | u747862999 | 1492491572 | Python | Python | py | Runtime Error | 0 | 0 | 247 | def power(m,n):
a = m**n % 1000000007
return a
l = map(int, raw_input().split())
print power(l[0],l[1])
~
~ | File "/tmp/tmpndnb7vge/tmpu0tvv2jv.py", line 6
print power(l[0],l[1])
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s949432331 | p02468 | u258386856 | 1492491675 | Python | Python3 | py | Runtime Error | 0 | 0 | 230 | def power(x, y):
answer = x
for i in range(y-1):
answer *= x
answer = answer % 1000000007
return answer
l = raw_input().split()
print power(int(l[0]), int(l[1])) | File "/tmp/tmpp9fpusyo/tmpllqu3opd.py", line 9
print power(int(l[0]), int(l[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s491401574 | p02468 | u258386856 | 1492491772 | Python | Python3 | py | Runtime Error | 0 | 0 | 230 | def power(x, y):
answer = x
for i in range(y-1):
answer = answer % 1000000007
answer *= x
return answer
l = raw_input().split()
print power(int(l[0]), int(l[1])) | File "/tmp/tmp5g6xx4tu/tmpybm6ojmy.py", line 9
print power(int(l[0]), int(l[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s364962877 | p02468 | u258386856 | 1492491802 | Python | Python3 | py | Runtime Error | 0 | 0 | 249 | def power(x, y):
answer = x
for i in range(y-1):
answer *= x
answer = answer % 1000000007
return answer
l = raw_input().split()
print power(int(l[0]), int(l[1])) | File "/tmp/tmp0q7bv85a/tmps9in23v0.py", line 10
print power(int(l[0]), int(l[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s150545264 | p02468 | u258386856 | 1492491820 | Python | Python3 | py | Runtime Error | 0 | 0 | 230 | def power(x, y):
answer = x
for i in range(y-1):
answer *= x
answer = answer % 1000000007
return answer
l = raw_input().split()
print power(int(l[0]), int(l[1])) | File "/tmp/tmpnw8d8u_b/tmp9w1i0qut.py", line 9
print power(int(l[0]), int(l[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s461447479 | p02468 | u258386856 | 1492491848 | Python | Python3 | py | Runtime Error | 0 | 0 | 230 | def power(x, y):
answer = x
for i in range(y-1):
answer *= x
answer = answer % 1000000007
return answer
l = raw_input().split()
print power(int(l[0]), int(l[1])) | File "/tmp/tmpbickv06p/tmpb54t4t_5.py", line 9
print power(int(l[0]), int(l[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s897244584 | p02468 | u258386856 | 1492491854 | Python | Python3 | py | Runtime Error | 0 | 0 | 230 | def power(x, y):
answer = x
for i in range(y-1):
answer *= x
answer = answer % 1000000007
return answer
l = raw_input().split()
print power(int(l[0]), int(l[1])) | File "/tmp/tmpn1l0r3y8/tmpzxiz__ef.py", line 9
print power(int(l[0]), int(l[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s932281973 | p02468 | u371539389 | 1495680776 | Python | Python3 | py | Runtime Error | 20 | 7600 | 153 | def ENT(m,n):
if n==0:
return 1
else:
return (ENT(m,n-1)*m)%1000000007
m,n=[int(i) for i in input().split(" ")]
print(ENT(m,n)) | Traceback (most recent call last):
File "/tmp/tmpvab1ibad/tmp4l4hyjau.py", line 7, in <module>
m,n=[int(i) for i in input().split(" ")]
^^^^^^^
EOFError: EOF when reading a line
| |
s572300422 | p02468 | u371539389 | 1495681323 | Python | Python3 | py | Runtime Error | 60 | 7704 | 291 | a=1000000007
def isuu(m,n):
result=1
i=0
while i<n:
result=(result*m)%a
if result==1:
return [0,i]
i+=1
return [1,result]
m,n=[int(i) for i in input().split(" ")]
i=isuu(m,n)
if i[0]==1:
print(i[1])
else:
print((m**(n%i[1]))%a) | Traceback (most recent call last):
File "/tmp/tmpico_s16m/tmp091vn9h9.py", line 14, in <module>
m,n=[int(i) for i in input().split(" ")]
^^^^^^^
EOFError: EOF when reading a line
| |
s191127199 | p02468 | u650790815 | 1496731384 | Python | Python3 | py | Runtime Error | 0 | 0 | 49 | m,n = map(int,input())
print(pow(m,n,1000000007)) | Traceback (most recent call last):
File "/tmp/tmptig527ec/tmpjexob1ye.py", line 1, in <module>
m,n = map(int,input())
^^^^^^^
EOFError: EOF when reading a line
| |
s444836514 | p02468 | u797673668 | 1499926760 | Python | Python3 | py | Runtime Error | 0 | 0 | 52 | print(pow(*map(int, input().split()), int(1e9) + 7)) | Traceback (most recent call last):
File "/tmp/tmpnejk8ws6/tmpi1u5rcj5.py", line 1, in <module>
print(pow(*map(int, input().split()), int(1e9) + 7))
^^^^^^^
EOFError: EOF when reading a line
| |
s760169829 | p02468 | u072053884 | 1500644228 | Python | Python3 | py | Runtime Error | 0 | 0 | 283 | d = 1000000007
def pow_rem(x, n):
if n == 0:
return x ** n % d
if n % 2 == 0:
return pow_rem(x, n // 2) ** 2 % d
else:
return ((pow_rem(x , n // 2) ** 2) * x) % d
def solve():
m, n = map(int, input().split())
print(pow_rem(m, n)
solve() | File "/tmp/tmp26hb7kqa/tmpxghokiqe.py", line 13
print(pow_rem(m, n)
^
SyntaxError: '(' was never closed
| |
s148871654 | p02468 | u350064373 | 1509080160 | Python | Python3 | py | Runtime Error | 0 | 0 | 194 | def pow2(m, n):
M = 1000000007
if n == 0
return 1
res = pow2(m*m%M, n/2)
if n%2 == 1
res = res*m%M
return res
m,n = map(int,input().split())
print(pow2(m,n)) | File "/tmp/tmp8wujb6fy/tmphbh6lj7l.py", line 3
if n == 0
^
SyntaxError: expected ':'
| |
s281621683 | p02468 | u700120734 | 1510375134 | Python | Python3 | py | Runtime Error | 0 | 0 | 197 | def pow_mod(n, x, mod) :
if n == 1:
return n
ret = pow_mod(n*n, x//2, mod)
if x % 2 == 1:
ret *= n
return ret
n, x = list(map(int, input().split()))
print(pow_mod(n, x, 1000000007) | File "/tmp/tmp7e0hgl95/tmppsfw99mw.py", line 10
print(pow_mod(n, x, 1000000007)
^
SyntaxError: '(' was never closed
| |
s550110586 | p02468 | u933096856 | 1510406867 | Python | Python3 | py | Runtime Error | 0 | 0 | 41 | m.n=map(int, input().split())
print(m**n) | Traceback (most recent call last):
File "/tmp/tmphmy23h9o/tmptg2r5zr2.py", line 1, in <module>
m.n=map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s390729660 | p02468 | u150984829 | 1516796362 | Python | Python3 | py | Runtime Error | 0 | 0 | 46 | import math
print(math.pow(map(int,input())))
| Traceback (most recent call last):
File "/tmp/tmp44riihix/tmptk614mt9.py", line 2, in <module>
print(math.pow(map(int,input())))
^^^^^^^
EOFError: EOF when reading a line
| |
s671303122 | p02468 | u908651435 | 1524825915 | Python | Python3 | py | Runtime Error | 0 | 0 | 59 | a,b=map(int, input().split())
mn=m**n
print(mn/1000000007)
| Traceback (most recent call last):
File "/tmp/tmpkjqeo983/tmpbs5rtawq.py", line 1, in <module>
a,b=map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s415093272 | p02468 | u776144521 | 1527585595 | Python | Python | py | Runtime Error | 0 | 0 | 82 | m, n = map(int, input().split())
print(pow(m, n, int(1e9) + 7))javascript:void(0)
| File "/tmp/tmp31mkuwjo/tmpyjdfeyoo.py", line 2
print(pow(m, n, int(1e9) + 7))javascript:void(0)
^^^^^^^^^^
SyntaxError: invalid syntax
| |
s251285605 | p02468 | u776144521 | 1527585600 | Python | Python3 | py | Runtime Error | 0 | 0 | 82 | m, n = map(int, input().split())
print(pow(m, n, int(1e9) + 7))javascript:void(0)
| File "/tmp/tmpujucqjev/tmpmb_s3_dj.py", line 2
print(pow(m, n, int(1e9) + 7))javascript:void(0)
^^^^^^^^^^
SyntaxError: invalid syntax
| |
s850779760 | p02468 | u445032255 | 1530256077 | Python | Python3 | py | Runtime Error | 0 | 0 | 118 | from math import *
def main()
m, n = [int(_) for _ in input().split()]
print(pow(m, n, 1000000007))
main()
| File "/tmp/tmp6vmp0ewv/tmpg2dpe_ag.py", line 3
def main()
^
SyntaxError: expected ':'
| |
s879245952 | p02468 | u445032255 | 1530256122 | Python | Python3 | py | Runtime Error | 0 | 0 | 119 | from math import *
def main():
m, n = [int(_) for _ in input().split()]
print(pow(m, n, 1000000007))
main()
| Traceback (most recent call last):
File "/tmp/tmp65s7kw3k/tmpzd8fuylw.py", line 7, in <module>
main()
File "/tmp/tmp65s7kw3k/tmpzd8fuylw.py", line 4, in main
m, n = [int(_) for _ in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s095190884 | p02468 | u445032255 | 1530256164 | Python | Python3 | py | Runtime Error | 30 | 5692 | 125 | from math import *
def main():
m, n = [int(_) for _ in input().split()]
print(int(pow(m, n) % 1000000007))
main()
| Traceback (most recent call last):
File "/tmp/tmp3yl5s1y8/tmpu3708hye.py", line 7, in <module>
main()
File "/tmp/tmp3yl5s1y8/tmpu3708hye.py", line 4, in main
m, n = [int(_) for _ in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s913843751 | p02469 | u567380442 | 1427709737 | Python | Python3 | py | Runtime Error | 0 | 0 | 764 | import math
def sieve(n):
p = [1] * (n + 1)
p[0] = p[1] = 0
for i in range(math.ceil((n + 1) ** 0.5)):
if p[i]:
for j in range(2 * i, len(p), i):
p[j] = 0
return p
def prime_factor(n):
p = sieve(int(n ** 0.5))
factor = []
for pi in compress(count(0),... | Traceback (most recent call last):
File "/tmp/tmp56_lsjvh/tmprzrlclhu.py", line 28, in <module>
n = int(readline())
^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s896629819 | p02469 | u022407960 | 1481078286 | Python | Python3 | py | Runtime Error | 0 | 0 | 533 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
input:
4
1 2 3 5
output:
30
"""
import sys
import math
from functools import reduce
def gcd(x, y):
if x < y:
x, y = y, x
while y > 0:
r = x % y
x = y
y = r
return x
def lcm(a, b):
return a * b // math.gcd(a, b)
... | Traceback (most recent call last):
File "/tmp/tmppyzti2wr/tmpsgfxte57.py", line 40, in <module>
cnt = int(_input[0])
~~~~~~^^^
IndexError: list index out of range
| |
s871541992 | p02469 | u022407960 | 1481078353 | Python | Python3 | py | Runtime Error | 0 | 0 | 533 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
input:
4
1 2 3 5
output:
30
"""
import sys
import math
from functools import reduce
def gcd(x, y):
if x < y:
x, y = y, x
while y > 0:
r = x % y
x = y
y = r
return x
def lcm(a, b):
return a * b // math.gcd(a, b)
... | Traceback (most recent call last):
File "/tmp/tmprko379h1/tmplyt89p_m.py", line 40, in <module>
cnt = int(_input[0])
~~~~~~^^^
IndexError: list index out of range
| |
s769818951 | p02469 | u923668099 | 1495535351 | Python | Python3 | py | Runtime Error | 0 | 0 | 268 | import sys
from math import gcd
from functools import reduce
def solve():
n = int(input())
a = [int(i) for i in input().split()]
ans = reduce(lcm, a, 1)
print(ans)
def lcm(a, b):
return a * b // gcd(a, b)
if __name__ == '__main__':
solve() | Traceback (most recent call last):
File "/tmp/tmpbbza8cjw/tmpcibglcgw.py", line 17, in <module>
solve()
File "/tmp/tmpbbza8cjw/tmpcibglcgw.py", line 6, in solve
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s652897366 | p02469 | u197615397 | 1496834616 | Python | Python3 | py | Runtime Error | 0 | 0 | 372 | import numpy as np
import math
n = int(input())
a = np.array([int(n) for n in input().split()])
divisors = []
for i in range(2, math.ceil(math.sqrt(a.max()))+1):
while True:
cond = (a%i==0)
if cond.sum() > 1:
a[cond] //= i
divisors.append(i)
else:
break
pr... | Traceback (most recent call last):
File "/tmp/tmpmmo5zr1m/tmp_q42fsui.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s906089561 | p02469 | u197615397 | 1496834778 | Python | Python3 | py | Runtime Error | 0 | 0 | 12 | import numpy | ||
s727042180 | p02469 | u072053884 | 1504495280 | Python | Python3 | py | Runtime Error | 0 | 0 | 249 | import math
def lcm(a, b):
return int(a * b / int(math.gcd(a, b)))
def solve():
n = input()
nums = list(map(int, input().split()))
c_m = lcm(nums[0], nums[1])
for n in nums[2:]:
c_m = lcm(c_m, n)
print(c_m)
solve() | Traceback (most recent call last):
File "/tmp/tmpy8hmdeyb/tmp2ge21ni9.py", line 14, in <module>
solve()
File "/tmp/tmpy8hmdeyb/tmp2ge21ni9.py", line 7, in solve
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s058394473 | p02469 | u633068244 | 1393698987 | Python | Python | py | Runtime Error | 0 | 0 | 152 | def gcd(a, b):
if b == 0:
return a
else:
return gcd(b, a%b)
a, b = map(int, raw_input().split())
g = gcd(a,b)
l = a*b/g
print l | File "/tmp/tmpxx4q11rm/tmph0heb7i_.py", line 10
print l
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s378571160 | p02469 | u633068244 | 1393699224 | Python | Python | py | Runtime Error | 0 | 0 | 228 | def gcd(a, b):
if b == 0:
return a
else:
return gcd(b, a%b)
n = int(raw_input())
an = map(int, raw_input())
l = a[0]
for i in range(1,len(a)-1):
b = a[i]
g = gcd(l,b)
l = a*b/g
print l
| File "/tmp/tmpgwkx2m33/tmp9g1i1tgg.py", line 15
print l
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s958402760 | p02470 | u284474275 | 1423901528 | Python | Python | py | Runtime Error | 30 | 5576 | 910 | import sys
import itertools
def sieve(n):
is_prime = [True] * (n + 1)
prime_list = []
is_prime[0] = is_prime[1] = False
prime_list.append(2)
for i in range(3, n + 1, 2):
if is_prime[i]: prime_list.append(i)
for j in range(i * i, n + 1, i):
is_prime[j] = False
... | Traceback (most recent call last):
File "/tmp/tmp8x14mk22/tmppcunm7nq.py", line 32, in <module>
n = int(n)
^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s506530044 | p02470 | u567380442 | 1427717751 | Python | Python3 | py | Runtime Error | 0 | 0 | 520 | from itertools import compress, count
def prime_factor(n):
p = sieve(int(n ** 0.5))
factor = []
for pi in compress(count(0), p):
while n % pi == 0:
n //= pi
factor.append(pi)
if n != 1:
factor.append(n)
return factor
from sys import stdin
from functools impo... | Traceback (most recent call last):
File "/tmp/tmpkp4h__7u/tmpaijo6mm9.py", line 20, in <module>
print(reduce(mul, (pow(p, k) - pow(p, k - 1) for p, k in Counter(prime_factor(int(readline()))).items())))
^^^^^^^^^^^^^^^
ValueError: i... | |
s317733957 | p02470 | u128782009 | 1462633540 | Python | Python3 | py | Runtime Error | 200 | 15308 | 503 | a=int(input())
li=[0]*1000001
count=1
i=2 # ??????????????°
while i<a:
r=0
ta=a
b=i
if li[i]!=1:
while True:
r=ta%b
if r==0:
break
ta=b
b=r
if b==1:
count+=1
else:
tem... | Traceback (most recent call last):
File "/tmp/tmpk6aeaud6/tmpv75l7duv.py", line 1, in <module>
a=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s877251512 | p02470 | u512342660 | 1463564515 | Python | Python | py | Runtime Error | 10 | 6588 | 585 | def mark(s, x):
for i in xrange(x + x, len(s), x):
s[i] = False
def sieve(n):
s = [True] * n
for x in xrange(2, int(n**0.5) + 1):
if s[x]: mark(s, x)
return [i for i in xrange(0,n) if s[i] and i > 1]
n = input()
tmpn =n
primes = sieve(n/2+1)
# print primes
anslist = []
x = 0
while True... | File "/tmp/tmp6ll5unjq/tmp__ngep3b.py", line 31
print int(ans)
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s081027681 | p02470 | u150984829 | 1516851135 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | p=1;a=[]
n=int(input());s=n**.5
while n%2==0 and n>3:a+=[2];n//=2
d=3
while s>d and n>d:
if n%d==0:a+=[d];n//=d
else:d+=2
a+=[n]
for f in set(a):
p*=f**a.count(f)*(1-1/f)
print(int(p)
| File "/tmp/tmp4112dsvw/tmp8ehebd1y.py", line 11
print(int(p)
^
SyntaxError: '(' was never closed
| |
s702655804 | p02470 | u633068244 | 1393700298 | Python | Python | py | Runtime Error | 4920 | 322504 | 583 | import math
n = m = int(raw_input())
r = int(math.sqrt(n))
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
if p[i]:
p[2*i+1::i+1] = [0 for x in range(2*i+1,r,i+1)]
prime=[]
for i in range(r):
if p[i]:
prime.append(i+1)
a = []
for i in range(len(prime)):
if n % prime... | File "/tmp/tmp4ds4z6u1/tmpen_qm0mo.py", line 36
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s134718954 | p02470 | u633068244 | 1393700450 | Python | Python | py | Runtime Error | 4730 | 322504 | 583 | import math
n = m = int(raw_input())
r = int(math.sqrt(n))
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
if p[i]:
p[2*i+1::i+1] = [0 for x in range(2*i+1,r,i+1)]
prime=[]
for i in range(r):
if p[i]:
prime.append(i+1)
a = []
for i in range(len(prime)):
if n % prime... | File "/tmp/tmp40ruirig/tmpfap_apdh.py", line 36
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s543958499 | p02470 | u633068244 | 1396104521 | Python | Python | py | Runtime Error | 2800 | 315504 | 333 | import math
n = int(raw_input())
sqrt = int(math.sqrt(n))
p = [1]*(n+1)
p[0] = 0
for i in range(2,sqrt+1):
if p[i]:
p[2*i::i] = [0 for x in range(2*i,n+1,i)]
div = []
for i in range(2,n/2+1):
if p[i] and n%i == 0:
div.append(i)
p = [1]*(n+1)
p[0],p[n] = 0,0
for i in div:
p[i::i] = [0 for x in range(i,n+1,i)]
... | File "/tmp/tmp56ui1dlk/tmp7dg94t7t.py", line 20
print sum(p)
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s749749346 | p02470 | u633068244 | 1396105714 | Python | Python | py | Runtime Error | 0 | 0 | 496 | import math
def plist(n):
sqrt = int(math.sqrt(n))
p = [1]*(sqrt+3)
p[0] = 0
for i in range(2,int(math.sqrt(sqrt))+2):
if p[i]:
p[2*i::i] = [0 for x in range(2*i,sqrt+1,i)]
return p
def get_pfact(p,n):
div = []
sqrt = int(math.sqrt(n))
for i in range(2,sqrt+3):
if p[i] and n%i == 0:
div.append(i)
r... | File "/tmp/tmp2w0390k1/tmpslql8k9k.py", line 30
print phai(n,div)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s720911336 | p02470 | u633068244 | 1396106219 | Python | Python | py | Runtime Error | 0 | 0 | 608 | import math
def make_plist(n):
sqrt = int(math.sqrt(n))
plist = [1]*(sqrt+3)
plist[0] = 0
for i in range(2,int(math.sqrt(sqrt))+2):
if plist[i]:
plist[2*i::i] = [0 for x in range(2*i,sqrt+3,i)]
return plist
def get_pfact(plist,n):
pfact = []
sqrt = int(math.sqrt(n))
for i in range(2,sqrt+1):
if plist[i... | File "/tmp/tmp2ousrnm1/tmp6qx6q4ad.py", line 31
print get_phai(n,pfacts)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s102050307 | p02470 | u633068244 | 1396107778 | Python | Python | py | Runtime Error | 0 | 0 | 686 | import math
def make_plist(n):
sqrt = int(math.sqrt(n))
plist = [1]*(sqrt+3)
for i in range(2,int(math.sqrt(sqrt))+3):
if plist[i]:
plist[2*i::i] = [0 for x in range(2*i,sqrt+3,i)]
return plist
def get_pfact(plist,n):
pfact = []
sqrt = int(math.sqrt(n))
for i in range(2... | File "/tmp/tmpesaql9ca/tmp4rreu6d4.py", line 31
print get_phai(n,pfacts)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s949070783 | p02470 | u633068244 | 1396109253 | Python | Python | py | Runtime Error | 0 | 0 | 645 | import math
def make_plist(n):
sqrt = int(math.sqrt(n))
plist = [1]*(n/2+1)
for i in range(2,int(math.sqrt(sqrt))+3):
if plist[i]:
plist[2*i::i] = [0 for x in range(2*i,sqrt+3,i)]
return plist
def get_pfact(plist,n):
pfact = []
sqrt = int(math.sqrt(n))
for i in range(2,sqrt+3):
if plist[i] and n%i == 0:... | File "/tmp/tmpo25m228_/tmp6ihu8lhd.py", line 33
print get_phai(n,pfacts)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s399082194 | p02470 | u633068244 | 1396109345 | Python | Python | py | Runtime Error | 590 | 142516 | 646 | import math
def make_plist(n):
sqrt = int(math.sqrt(n))
plist = [1]*(n/2+1)
for i in range(2,int(math.sqrt(sqrt))+3):
if plist[i]:
plist[2*i::i] = [0 for x in range(2*i,n/2+1,i)]
return plist
def get_pfact(plist,n):
pfact = []
sqrt = int(math.sqrt(n))
for i in range(2,sqrt+3):
if plist[i] and n%i == 0:
... | File "/tmp/tmpik1q5mgi/tmpxb384x59.py", line 33
print get_phai(n,pfacts)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s473985085 | p02471 | u548155360 | 1531562627 | Python | Python3 | py | Runtime Error | 0 | 0 | 2213 | # coding=utf-8
def vector_minus(v1, v2):
return [elm1 - elm2 for elm1, elm2 in zip(v1, v2)]
def scalar_multi(scalar, vector):
return [scalar*elm for elm in vector]
def gcd(n1, n2):
if n1 < n2:
n1, n2 = n2, n1
if n1 == n2 or n2 == 0:
return n1
n1, n2 = n2, (n1 % n2)
return ... | Traceback (most recent call last):
File "/tmp/tmp2kk920fv/tmpj9rzkxfp.py", line 79, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s626473892 | p02471 | u284474275 | 1423901418 | Python | Python | py | Runtime Error | 0 | 0 | 884 | import sys
def sieve(n):
is_prime = [True] * (n + 1)
prime_list = []
is_prime[0] = is_prime[1] = False
prime_list.append(2)
for i in range(3, n + 1, 2):
if is_prime[i]: prime_list.append(i)
for j in range(i * i, n + 1, i):
is_prime[j] = False
return prime_l... | Traceback (most recent call last):
File "/tmp/tmpoy9xnfoz/tmp3ppd2ha0.py", line 31, in <module>
n = int(n)
^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s010874908 | p02471 | u284474275 | 1423901450 | Python | Python | py | Runtime Error | 0 | 0 | 910 | import sys
import itertools
def sieve(n):
is_prime = [True] * (n + 1)
prime_list = []
is_prime[0] = is_prime[1] = False
prime_list.append(2)
for i in range(3, n + 1, 2):
if is_prime[i]: prime_list.append(i)
for j in range(i * i, n + 1, i):
is_prime[j] = False
... | Traceback (most recent call last):
File "/tmp/tmp0r4pjedq/tmpthcjut2q.py", line 32, in <module>
n = int(n)
^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s304941729 | p02471 | u128782009 | 1462874458 | Python | Python3 | py | Runtime Error | 0 | 0 | 567 | # -*- coding: utf-8 -*-
"""
Created on Sat May 7 22:31:12 2016
@author: kt
"""
def gcd(a,b): #?????§??¬?´???°???????????°??????
r=0
while True:
r=a%b
if r==0:
break
a=b
b=r
return b
a, b = map(int, input().split(","))
g=gcd(a,b)
a=a/g
b=b/g
c=0
x1=1
x2=0
z1=a
y1=0
... | Traceback (most recent call last):
File "/tmp/tmpqufqq1_z/tmpk27ha5cb.py", line 18, in <module>
a, b = map(int, input().split(","))
^^^^^^^
EOFError: EOF when reading a line
| |
s587444590 | p02471 | u128782009 | 1462874480 | Python | Python3 | py | Runtime Error | 30 | 7760 | 567 | # -*- coding: utf-8 -*-
"""
Created on Sat May 7 22:31:12 2016
@author: kt
"""
def gcd(a,b): #?????§??¬?´???°???????????°??????
r=0
while True:
r=a%b
if r==0:
break
a=b
b=r
return b
a, b = map(int, input().split(" "))
g=gcd(a,b)
a=a/g
b=b/g
c=0
x1=1
x2=0
z1=a
y1=0
... | Traceback (most recent call last):
File "/tmp/tmp3jlea_36/tmp7pi7osh0.py", line 18, in <module>
a, b = map(int, input().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s927179649 | p02471 | u128782009 | 1462875111 | Python | Python3 | py | Runtime Error | 20 | 7772 | 560 | # -*- coding: utf-8 -*-
"""
Created on Sat May 7 22:31:12 2016
@author: kt
"""
def gcd(a,b): #?????§??¬?´???°???????????°??????
r=0
while True:
r=a%b
if r==0:
break
a=b
b=r
return b
a, b = map(int, input().split(" "))
g=gcd(a,b)
a=a/g
b=b/g
c=0
x1=1
x2=0
z1=a
y1=0
... | Traceback (most recent call last):
File "/tmp/tmp29emb7ir/tmpqg806l6t.py", line 18, in <module>
a, b = map(int, input().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s427562258 | p02471 | u128782009 | 1462875270 | Python | Python3 | py | Runtime Error | 20 | 7760 | 568 | # -*- coding: utf-8 -*-
"""
Created on Sat May 7 22:31:12 2016
@author: kt
"""
def gcd(a,b): #?????§??¬?´???°???????????°??????
r=0
while True:
r=a%b
if r==0:
break
a=b
b=r
return b
a, b = map(int, input().split(" "))
g=gcd(a,b)
a=a/g
b=b/g
c=0
x1=1
x2=0
z1=a
y1=0
... | Traceback (most recent call last):
File "/tmp/tmp_0ruirtk/tmpnnvfr04n.py", line 18, in <module>
a, b = map(int, input().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s014432374 | p02471 | u128782009 | 1462875642 | Python | Python3 | py | Runtime Error | 40 | 7764 | 616 | # -*- coding: utf-8 -*-
"""
Created on Sat May 7 22:31:12 2016
@author: kt
"""
def gcd(a,b): #?????§??¬?´???°???????????°??????
r=0
while True:
r=a%b
if r==0:
break
a=b
b=r
return b
a, b = map(int, input().split(" "))
g=gcd(a,b)
a=a/g
b=b/g
c=0
x1=1
x2=0
z1=a
y1=0
... | Traceback (most recent call last):
File "/tmp/tmpgo0pmu4w/tmpudtd_a_6.py", line 18, in <module>
a, b = map(int, input().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s802440387 | p02471 | u128782009 | 1462875746 | Python | Python3 | py | Runtime Error | 30 | 7752 | 616 | # -*- coding: utf-8 -*-
"""
Created on Sat May 7 22:31:12 2016
@author: kt
"""
def gcd(a,b): #?????§??¬?´???°???????????°??????
r=0
while True:
r=a%b
if r==0:
break
a=b
b=r
return b
a, b = map(int, input().split(" "))
g=gcd(a,b)
a=a/g
b=b/g
c=0
x1=1
x2=0
z1=a
y1=0
... | Traceback (most recent call last):
File "/tmp/tmp8k787eap/tmpc9us95s2.py", line 18, in <module>
a, b = map(int, input().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s448976122 | p02471 | u022407960 | 1481081528 | Python | Python3 | py | Runtime Error | 0 | 0 | 396 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
input:
3 8
output:
3 -1
"""
import sys
def ext_euclid(a, b):
if b == 0:
return 1, 0, a
else:
x, y, q = ext_euclid(b, a % b)
x, y = y, (x - (a // b) * y)
return x, y
if __name__ == '__main__':
_input = sys.stdin.readlin... | Traceback (most recent call last):
File "/tmp/tmpnmi2wewn/tmp_6k9k4s6.py", line 27, in <module>
n1, n2 = map(int, _input[0].split())
~~~~~~^^^
IndexError: list index out of range
| |
s813304124 | p02471 | u072053884 | 1505926120 | Python | Python3 | py | Runtime Error | 20 | 7816 | 496 | def gcd(a, b):
while b:
a, b = b, a % b
return a
def solve():
a, b = map(int, input().split())
if a == b or a % b == 0:
print(0, 1)
elif b % a == 0:
print(1, 0)
else:
coe = [[1, 0], [0, 1]]
while b != 1:
quo = a // b
coe_d1 = coe[1... | Traceback (most recent call last):
File "/tmp/tmprh2_is_2/tmphbfk0a21.py", line 22, in <module>
solve()
File "/tmp/tmprh2_is_2/tmphbfk0a21.py", line 7, in solve
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s020456321 | p02471 | u150984829 | 1516872291 | Python | Python3 | py | Runtime Error | 0 | 0 | 101 | r,s=map(int,input().split())
a=d=1,b=c=0
while r:q=r//s;r,s,a,c,b,d=s,r%s,c,a-q*c,d,b-q*d
print(a,b)
| File "/tmp/tmpjpgianwu/tmpjuji8o7x.py", line 2
a=d=1,b=c=0
^
SyntaxError: cannot assign to literal
| |
s140763314 | p02471 | u150984829 | 1516872306 | Python | Python3 | py | Runtime Error | 0 | 0 | 104 | r,s=map(int,input().split())
a=d=1,b=c=0
while r:
q=r//s
r,s,a,c,b,d=s,r%s,c,a-q*c,d,b-q*d
print(a,b)
| File "/tmp/tmpwbehvwqj/tmp39kbbmct.py", line 2
a=d=1,b=c=0
^
SyntaxError: cannot assign to literal
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.