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
s038710568
p02574
u926266624
1599122721
Python
Python (3.8.2)
py
Runtime Error
23
9016
655
N = map(int, input().split()) A = list(map(int, input().split())) pairwise_flg = true setwis_flg = true for i in range(N-1): if gcd(A[i], A[i+1]) != 1: pairwise_flg = false break if pairwise_flg == false: for i in range(N): for j in range(N): if i != j: if gcd(A[i],A[j]) !=1: ...
File "/tmp/tmpspdza1d4/tmpm2_j47ye.py", line 33 for i range(a,1,-1): ^^^^^ SyntaxError: invalid syntax
s379369892
p02574
u223904637
1599086437
Python
Python (3.8.2)
py
Runtime Error
2211
216316
867
from math import gcd n=int(input()) l=list(map(int,input().split())) mal=max(l) e=[0 for i in range(mal+1)] import numpy as np def searchPrimeNum(N): ma = int(np.sqrt(N)) searchList = [i for i in range(2,N+1)] primeNum = [] while searchList[0] <= ma: primeNum.append(searchList[0]) tmp =...
Traceback (most recent call last): File "/tmp/tmpqxzf3f98/tmpzyfebu35.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s358326137
p02574
u223904637
1599085983
Python
Python (3.8.2)
py
Runtime Error
2212
235508
925
from math import gcd n=int(input()) l=list(map(int,input().split())) mal=max(l) e=[0 for i in range(mal+1)] import numpy as np def searchPrimeNum(N): ma = int(np.sqrt(N)) searchList = [i for i in range(2,N+1)] primeNum = [] while searchList[0] <= ma: primeNum.append(searchList[0]) tmp =...
Traceback (most recent call last): File "/tmp/tmp33ni767p/tmpet0_b59h.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s309569221
p02574
u555311916
1599083821
Python
PyPy3 (7.3.0)
py
Runtime Error
582
212900
629
import math n = int(input()) a = list(map(int,input().split())) MAX = 1000005 is_prime = [1]*MAX D = [None]*MAX is_prime[0],is_prime[1] = 0,0 for i in range(2,MAX): if is_prime[i]: D[i] = i for j in range(i*2,MAX,i): is_prime[j] = 0 D[j] = i counts = [0]*MAX pair = True for a_i in a: ...
Traceback (most recent call last): File "/tmp/tmpe5j3k11f/tmp6jrclqpn.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s262729358
p02574
u555311916
1599083601
Python
PyPy3 (7.3.0)
py
Runtime Error
563
213132
625
import math n = int(input()) a = list(map(int,input().split())) MAX = 1000005 is_prime = [1]*MAX D = [None]*MAX is_prime[0],is_prime[1] = 0,0 for i in range(2,MAX): if is_prime[i]: D[i] = i for j in range(i,MAX,i): is_prime[j] = 0 D[j] = i counts = [0]*MAX pair = True for a_i in a: w...
Traceback (most recent call last): File "/tmp/tmp4fd9rqxl/tmpdmqzjrlj.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s893365813
p02574
u418826171
1599082987
Python
PyPy3 (7.3.0)
py
Runtime Error
97
74880
453
H, W, M = map(int,input().split()) P = [list(map(int, input().split())) for i in range(M)] for p in P: p[0] -= 1 p[1] -= 1 cnth = [0]*H cntw = [0]*W ans = 0 for p in P: cnth[p[0]] += 1 for p in P: cntw[p[1]] += 1 mxh = max(cnth) mxw = max(cntw) cntx = 0 for p in P: if cnth[p[0]] == mxh and cntw[p[1]...
Traceback (most recent call last): File "/tmp/tmpotuy031t/tmp27o2fma7.py", line 1, in <module> H, W, M = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s201077630
p02574
u585963734
1599082672
Python
Python (3.8.2)
py
Runtime Error
2207
128808
382
from math import gcd N=int(input()) A=list(map(int, input().split())) A=sorted(A) ans=[0]*(A[-1]+1) c=A[-1] for i in A: c=gcd(c,i) for j in range(2, int(-(-i**0.5//1))+1): if i%j==0: ans[j]+=1 ans[i]+=1 ans.pop(0) ans.pop(0) if max(ans)==1: print('pairwise coprime') elif c==1...
Traceback (most recent call last): File "/tmp/tmpv9ie22ce/tmpsh0glu2j.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s846015295
p02574
u633255271
1599081451
Python
PyPy3 (7.3.0)
py
Runtime Error
305
197856
413
N = int(input()) A = [0]*(100001) IIL = list(map(int, input().split())) for a in IIL: A[a] += 1 # MFPF = Most Frequent Prime Factor MFPF_n = 0 for i in range(2, 100001): n = i tmp = 0 while n < 100001: tmp += A[n] n += i MFPF_n = max(MFPF_n, tmp) if MFPF_n < 2: print('pairwise ...
Traceback (most recent call last): File "/tmp/tmp3o2__v5k/tmpdkqnzhbr.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s207979193
p02574
u633255271
1599081080
Python
PyPy3 (7.3.0)
py
Runtime Error
290
197668
403
N = int(input()) A = [0]*(100001) for a in list(map(int, input().split())): A[a] += 1 # MFPF = Most Frequent Prime Factor MFPF_n = 0 for i in range(2, 100001): n = i tmp = 0 while n < 100001: tmp += A[n] n += i MFPF_n = max(MFPF_n, tmp) if MFPF_n < 2: print('pairwise coprime') ...
Traceback (most recent call last): File "/tmp/tmpprjxgei0/tmpysrefz0d.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s903393354
p02574
u555311916
1599079548
Python
PyPy3 (7.3.0)
py
Runtime Error
925
298368
523
n = int(input()) a = list(map(int,input().split())) MAX = 10**6+1 divs = [[] for _ in range(MAX)] cnt = [0]*MAX for i in range(2,n): m = i while m <= MAX: divs[m].append(i) m += i pair = True setwise = True for i in range(n): for d in divs[a[i]]: if cnt[d] > 0: pair = False cnt[d] +=...
Traceback (most recent call last): File "/tmp/tmp_we4xnwi/tmp6lejfru_.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s753142988
p02574
u413165887
1599079319
Python
PyPy3 (7.3.0)
py
Runtime Error
353
220608
466
from math import gcd n = int(input()) a = list(map(int, input().split())) h = True checker = [0 for _i in range(10**6+1)] for i in a: checker[i] += 1 if sum(checker[i::i]) > 1: h = False break for j in range(i, 10**6+2, i): checker[j] += 1 if h == True: print('pairwise coprime...
Traceback (most recent call last): File "/tmp/tmpei5epxby/tmpzfco2bqp.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s495166805
p02574
u413165887
1599078446
Python
PyPy3 (7.3.0)
py
Runtime Error
89
74608
764
n = int(input()) a = list(map(int, input().split())) checker = [0 for _i in range(10**6+1)] h = True for i in a: if i == 1: continue num = i if num%2==0: checker[2] += 1 if checker[2] >= 2: h = False break for j in range(3, int(i**0.5)+1): if...
File "/tmp/tmp6ai8du3h/tmpp5iy3ya_.py", line 24 checker[num] += 1: ^ SyntaxError: invalid syntax
s847634635
p02574
u141304883
1599052184
Python
PyPy3 (7.3.0)
py
Runtime Error
2213
344816
1407
import math import fractions def make_prime_and_deleted_by_list(n): prime_list = [i for i in range(2, n+1)] deleted_by_list = [i for i in range(n+1)] pi = 0 target_prime = prime_list[pi] while(target_prime < math.sqrt(n)): old_prime_list = prime_list.copy() prime_list = prime_list[...
Traceback (most recent call last): File "/tmp/tmpq1ssh6z2/tmpnidc3l5a.py", line 37, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s031154072
p02574
u729133443
1599017194
Python
Python (3.8.2)
py
Runtime Error
25
9088
22
n=int(input()) 1/(n>3)
Traceback (most recent call last): File "/tmp/tmpephj3217/tmpidxjgwoe.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s660384833
p02574
u729133443
1599016994
Python
Python (3.8.2)
py
Runtime Error
2135
101508
302
c=[m:=0]*6**8 n,a=open(0) for a in a.split():c[int(a)]+=1 print(('not','psaeitr'[any((m:=max(m,sum(c[i::i])))>1for i in range(2,6**8))::2]+'wise')[m<int(n)],'coprime') print(('not','psaeitr'[any(c:=[max(0,sum(c[i::i])-1)for i in range(2,6**8)])::2]+'wise')[max(c)+1<int(n)],'coprime') 1/(max(c)+1==m)
/tmp/tmpocawbgsl/tmphuk2pyef.py:4: SyntaxWarning: invalid decimal literal print(('not','psaeitr'[any((m:=max(m,sum(c[i::i])))>1for i in range(2,6**8))::2]+'wise')[m<int(n)],'coprime') Traceback (most recent call last): File "/tmp/tmpocawbgsl/tmphuk2pyef.py", line 2, in <module> n,a=open(0) ^^^ ValueError: n...
s161972492
p02574
u729133443
1599007982
Python
PyPy3 (7.3.0)
py
Runtime Error
558
234652
283
n,*a=map(int,open(0).read().split()) m=6**8 c=[0]*m p=[1,1]+c[:] for i in range(m): if p[i]<1: for j in range(i,m,i):p[j]=i for a in a: c[a]+=1 while p[a]!=a: a//=p[a] c[a]+=1 1/(max(c[2:])<n) print(('not','psaeitr'[max(c[2:])>1::2]+'wise')[max(c[2:])<n],'coprime')
Traceback (most recent call last): File "/tmp/tmpcbc32rko/tmpt3153r39.py", line 1, in <module> n,*a=map(int,open(0).read().split()) ^^^^ ValueError: not enough values to unpack (expected at least 1, got 0)
s811931176
p02574
u729133443
1599007930
Python
PyPy3 (7.3.0)
py
Runtime Error
543
234624
284
n,*a=map(int,open(0).read().split()) m=6**8 c=[0]*m p=[1,1]+c[:] for i in range(m): if p[i]<1: for j in range(i,m,i):p[j]=i for a in a: c[a]+=1 while p[a]!=a: a//=p[a] c[a]+=1 1/(max(c[2:])==n) print(('not','psaeitr'[max(c[2:])>1::2]+'wise')[max(c[2:])<n],'coprime')
Traceback (most recent call last): File "/tmp/tmpdc8e7_r6/tmpaj_p5bzq.py", line 1, in <module> n,*a=map(int,open(0).read().split()) ^^^^ ValueError: not enough values to unpack (expected at least 1, got 0)
s036644547
p02574
u729133443
1599007385
Python
Python (3.8.2)
py
Runtime Error
2208
121468
266
n,*a=map(int,open(0).read().split()) m=max(a)+1 c=[0]*m p=[1,1]+c[:] for i in range(m): if p[i]<1: for j in range(i,m,i):p[j]=i for a in a: c[a]+=1 while p[a]!=a: a//=p[a] c[a]+=1 print(('not','psaeitr'[max(c[2:])>1::2]+'wise')[max(c)<n],'coprime')
Traceback (most recent call last): File "/tmp/tmph79g1zb6/tmpec6ukn7j.py", line 1, in <module> n,*a=map(int,open(0).read().split()) ^^^^ ValueError: not enough values to unpack (expected at least 1, got 0)
s798299225
p02574
u512007680
1598997885
Python
PyPy3 (7.3.0)
py
Runtime Error
283
220484
691
import math N = int(input()) A = list(map(int,input().split())) D = [i for i in range(1000001)] for i in range(2,1001): if D[i] == i: for j in range(2,1+100000//i): D[i*j] = i ### #print(D[:10]) ### det = True P = [] for a in A: Q = [] aa = a while aa > 1: Q.append(D[aa...
Traceback (most recent call last): File "/tmp/tmp70jdymsh/tmpq2xs8_md.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s852842756
p02574
u095426154
1598997485
Python
PyPy3 (7.3.0)
py
Runtime Error
1445
250880
1214
# coding: utf-8 from math import gcd def getPrime(x): num_list=[i for i in range(2,x+1)] prime_list=[] D=[x+1 for i in range(x+1)] while num_list[0]<x**(1/2): p=num_list.pop(0) prime_list.append(p) for i in range(len(num_list)): if num_list[i]%p==0: ...
Traceback (most recent call last): File "/tmp/tmpx5lat168/tmpnz84gzbs.py", line 25, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s409776200
p02574
u095426154
1598997387
Python
PyPy3 (7.3.0)
py
Runtime Error
1420
251724
1187
# coding: utf-8 from math import gcd def getPrime(x): num_list=[i for i in range(2,x+1)] prime_list=[] D=[x+1 for i in range(x+1)] while num_list[0]<x**(1/2): p=num_list.pop(0) prime_list.append(p) for i in range(len(num_list)): if num_list[i]%p==0: ...
Traceback (most recent call last): File "/tmp/tmp6zq9o6oa/tmpeb6ghx0h.py", line 25, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s301085255
p02574
u095426154
1598997312
Python
PyPy3 (7.3.0)
py
Runtime Error
2174
232520
1207
# coding: utf-8 from math import gcd def getPrime(x): num_list=[i for i in range(2,x+1)] prime_list=[] D=[x+1 for i in range(x+1)] while num_list[0]<x**(1/2): p=num_list.pop(0) prime_list.append(p) for i in range(len(num_list)): if num_list[i]%p==0: ...
Traceback (most recent call last): File "/tmp/tmp_0c240kj/tmppmvz376w.py", line 25, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s861405721
p02574
u116038906
1598994340
Python
Python (3.8.2)
py
Runtime Error
2208
127644
1442
# 自然数m以下の素数を返す(SETでRETURN) import math def prime_numbers(m): # 素数を保持するset primes = [] # 2以上m以下の素数を数え上げる n = 2 while n <= m: # 自身より小さい全ての素数で割り切れなければ、素数とみなせる if all(n % i != 0 for i in primes): primes.append(n) n += 1 return primes #素因数分解(10**6まで) def soinsu_b...
Traceback (most recent call last): File "/tmp/tmpil3_xetm/tmpza7_r1im.py", line 33, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s744542711
p02574
u726823037
1598992182
Python
Python (3.8.2)
py
Runtime Error
2206
127028
855
import sys import math def Ii():return int(sys.stdin.readline().rstrip()) def Mi():return map(int,sys.stdin.readline().split()) def Li():return list(map(int,sys.stdin.readline().split())) n = Ii() a = Li() sc = 0 g = math.gcd(a[0],a[1]) for i in range(n-2): g = math.gcd(g,a[i+2]) if(g == 1): sc = 1 break ...
Traceback (most recent call last): File "/tmp/tmpy7esd1_l/tmpj6zew2nx.py", line 6, in <module> n = Ii() ^^^^ File "/tmp/tmpy7esd1_l/tmpj6zew2nx.py", line 3, in Ii def Ii():return int(sys.stdin.readline().rstrip()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for...
s730021320
p02574
u633255271
1598990802
Python
PyPy3 (7.3.0)
py
Runtime Error
568
231896
972
# 入力 N = int(input()) A = list(map(int, input().split())) # 入力前処理 # 1はいくつあっても関係ないので除く A = [x for x in A if x > 1] N = len(A) R = max(A) prime_factor_counter = [0]*(R+1) # D[x]にxを割り切れる最初の素数を格納 # 次に行う素因数分解で試し割りのムダを削減するための前準備 D = [0]*(R+1) for i in range(2, R+1): if D[i]: continue n = i while n < R+...
Traceback (most recent call last): File "/tmp/tmpgxhy0qz7/tmpvfode3pm.py", line 2, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s025514970
p02574
u698919163
1598984494
Python
Python (3.8.2)
py
Runtime Error
444
127408
571
N = int(input()) A = list(map(int,input().split())) number_list = [0]*1000000 for a in A: number_list[a] += 1 flag1 = True flag2 = True for i in range(2,1000000): count = 0 for j in range(1,1000000): if i*j > 1000000: break tmp = i*j count += number_list[tmp] i...
Traceback (most recent call last): File "/tmp/tmp7umu6olk/tmp39_0prm3.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s582275444
p02574
u698919163
1598984435
Python
Python (3.8.2)
py
Runtime Error
521
127384
567
N = int(input()) A = list(map(int,input().split())) number_list = [0]*100010 for a in A: number_list[a] += 1 flag1 = True flag2 = True for i in range(2,100010): count = 0 for j in range(1,100010): if i*j > 100000: break tmp = i*j count += number_list[tmp] if co...
Traceback (most recent call last): File "/tmp/tmpjv678csm/tmpktlzs4z_.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s587229784
p02574
u698919163
1598984372
Python
Python (3.8.2)
py
Runtime Error
465
127364
567
N = int(input()) A = list(map(int,input().split())) number_list = [0]*100001 for a in A: number_list[a] += 1 flag1 = True flag2 = True for i in range(2,100001): count = 0 for j in range(1,100001): if i*j > 100000: break tmp = i*j count += number_list[tmp] if co...
Traceback (most recent call last): File "/tmp/tmphfo9jfyb/tmp3y1sfb4q.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s830956670
p02574
u277236383
1598984202
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
231992
751
from math import gcd def seachPrimeNum(N): max = int(N**0.5) seachList = [i for i in range(2,N+1)] primeNum = list(range(N+1)) while seachList[0] <= max: tmp = seachList[0] tmp2 = list(seachList) for i in tmp2: if i%tmp == 0: primeNum[i]=tmp seachList.remove(i) return pr...
Traceback (most recent call last): File "/tmp/tmpyqki0ula/tmp5hfg0ziy.py", line 37, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s287492842
p02574
u277236383
1598984048
Python
PyPy3 (7.3.0)
py
Runtime Error
2222
539316
1059
from math import gcd def seachPrimeNum(N): max = int(N**0.5) seachList = [i for i in range(2,N+1)] primeNum = list(range(N+1)) while seachList[0] <= max: tmp = seachList[0] tmp2 = list(seachList) for i in tmp2: if i%tmp == 0: primeNum[i]=tmp seachList.remove(i) return pr...
Traceback (most recent call last): File "/tmp/tmpqmxpq249/tmp9ezwxr9j.py", line 37, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s368414033
p02574
u785395825
1598983401
Python
Python (3.8.2)
py
Runtime Error
25
9024
1826
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ll long long int #define fast ios_base::sync_with_stdio(false) #define fast_input cin.tie(NULL) #define fast_output cout.tie(...
File "/tmp/tmpw8wo73rj/tmpclt3h96y.py", line 3 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s316024098
p02574
u414050834
1598981758
Python
Python (3.8.2)
py
Runtime Error
250
133008
286
import math from functools import reduce k=10**6+1 def judge(n,a): c=[0]**k for x in a: c[x]=+1 t=any(sum(c[i::i])>1 for i in range(2,k)) t+=reduce(gcd,a)>1 return ['pairwise','setwise','not'][t]+' coprime' n=int(input()) a=list(map(int,input().split())) print(judge(n,a))
Traceback (most recent call last): File "/tmp/tmp27dur5ae/tmpwnf6yb9l.py", line 11, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s611247254
p02574
u556069480
1598981277
Python
PyPy3 (7.3.0)
py
Runtime Error
279
181544
804
import math,sys n=int(input()) Ns=list(map(int, input().split())) ans_p="pairwise coprime" ans_s="setwise coprime" ans_n="not coprime" max_n=int(math.sqrt(10**6))+20 count=[False for _ in range(max_n)] def fac(x): i=2 flag=True while x>1: ind=0 while x%i == 0: ind+=1 ...
Traceback (most recent call last): File "/tmp/tmpjmgsrap5/tmpl7hq_kxk.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s114049489
p02574
u556069480
1598980225
Python
PyPy3 (7.3.0)
py
Runtime Error
246
181940
672
import math,sys n=int(input()) Ns=list(map(int, input().split())) ans_p="pairwise coprime" ans_s="setwise coprime" ans_n="not coprime" max_n=int(math.sqrt(10**6))+1 count=[0 for _ in range(max_n)] def fac(x,T): for i in range(2,math.sqrt(x)+1): if x%i ==0: if count[i]==1: re...
Traceback (most recent call last): File "/tmp/tmpcv3gjmc2/tmp4ibtfkat.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s549975077
p02574
u556069480
1598979273
Python
PyPy3 (7.3.0)
py
Runtime Error
314
180236
717
import math,sys n=int(input()) Ns=list(map(int, input().split())) ans_p="pairwise coprime" ans_s="setwise coprime" ans_n="not coprime" max_n=int(math.sqrt(10**7))+1 count=[0 for _ in range(max_n)] def fac(x,T): i=2 while x>1: ind=0 while x%i == 0: ind+=1 x=int(x/i) ...
Traceback (most recent call last): File "/tmp/tmp0hizipyz/tmps6u3dpi6.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s035518056
p02574
u556069480
1598979138
Python
PyPy3 (7.3.0)
py
Runtime Error
278
181736
717
import math,sys n=int(input()) Ns=list(map(int, input().split())) ans_p="pairwise coprime" ans_s="setwise coprime" ans_n="not coprime" max_n=int(math.sqrt(10**6))+1 count=[0 for _ in range(max_n)] def fac(x,T): i=2 while x>1: ind=0 while x%i == 0: ind+=1 x=int(x/i) ...
Traceback (most recent call last): File "/tmp/tmp0q6ze2lg/tmpflwvbica.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s643036303
p02574
u802977614
1598975941
Python
PyPy3 (7.3.0)
py
Runtime Error
2213
238448
2481
# region header import sys, bisect, math, itertools, heapq, collections from operator import itemgetter # a.sort(key=itemgetter(i)) # i番目要素でsort from functools import lru_cache import copy # @lru_cache(maxsize=None) sys.setrecursionlimit(10**8) input = sys.stdin.readline INF = float('inf') mod = 10**9 + 7 eps = 10**-7 ...
Traceback (most recent call last): File "/tmp/tmpevgn61wm/tmpneh8n_77.py", line 94, in <module> n = inp() ^^^^^ File "/tmp/tmpevgn61wm/tmpneh8n_77.py", line 21, in inp return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s961955078
p02574
u802977614
1598975209
Python
PyPy3 (7.3.0)
py
Runtime Error
2212
238424
2486
# region header import sys, bisect, math, itertools, heapq, collections from operator import itemgetter # a.sort(key=itemgetter(i)) # i番目要素でsort from functools import lru_cache import copy # @lru_cache(maxsize=None) sys.setrecursionlimit(10**8) input = sys.stdin.readline INF = float('inf') mod = 10**9 + 7 eps = 10**-7 ...
Traceback (most recent call last): File "/tmp/tmpi_0gkmmf/tmpjrbarg34.py", line 94, in <module> n = inp() ^^^^^ File "/tmp/tmpi_0gkmmf/tmpjrbarg34.py", line 21, in inp return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s304219949
p02574
u185948224
1598935302
Python
Python (3.8.2)
py
Runtime Error
2208
127488
686
n = int(input()) a = [int(x) for x in input().split()] m = max(a) primes = [1] * (m + 1) primes[0], primes[1] = 0, 0 primes[2] = 2 for i in range(2, int(m ** 0.5)+1): if primes[i] == 0: continue for j in range(i, m+1, i): if primes[j] == 1: primes[j] = i for i in range(m+1): if primes...
Traceback (most recent call last): File "/tmp/tmprz8ku8th/tmpn55dxea4.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s338833436
p02574
u681013601
1598927110
Python
PyPy3 (7.3.0)
py
Runtime Error
1362
191852
3005
# ------------------- fast io -------------------- import os import sys from io import BytesIO, IOBase BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file....
Traceback (most recent call last): File "/tmp/tmpernl37db/tmptm5kchef.py", line 87, in <module> n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s635709637
p02574
u314089899
1598915354
Python
PyPy3 (7.3.0)
py
Runtime Error
476
263404
1864
import math import sys from functools import lru_cache sys.setrecursionlimit(10000000) N = int(input()) A_list = [int(e) for e in input().split()] #pairwise coprime …… 素因数分解したとき、共通のものが1個もない #setwise coprime …… 素因数分解したとき、全てで共通のものがない #試し割の結果の辞書を求める def make_trial_division_dict(n): #import math td_dict = dict()...
Traceback (most recent call last): File "/tmp/tmpf9hbv9w2/tmpejr_9jwc.py", line 6, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s494927901
p02574
u650331402
1598912872
Python
Python (3.8.2)
py
Runtime Error
25
9004
2124
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ import java.util.*; /** * * @author ujjwal abhishek */ public class E { static int gcd(int a, int b) { if (a == 0...
File "/tmp/tmpeebrrt6n/tmpcedsbggx.py", line 1 /* ^ SyntaxError: invalid syntax
s544961663
p02574
u633255271
1598912800
Python
PyPy3 (7.3.0)
py
Runtime Error
2212
184156
733
from collections import defaultdict def prime_factors(n): arr = [] temp = n R = int(-(-n**0.5//1)) furui = [0]*(R+1) for i in range(2, R+1): if furui[i]: continue if temp%i == 0: while temp%i == 0: temp //= i arr.append(i) ...
Traceback (most recent call last): File "/tmp/tmpd2ec2cni/tmpmwoistqs.py", line 25, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s162017404
p02574
u633255271
1598912220
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
183820
578
from collections import defaultdict def prime_factors(n): arr = [] temp = n for i in range(2, int(-(-n**0.5//1))+1): if temp%i == 0: while temp%i == 0: temp //= i arr.append(i) if temp != 1: arr.append(temp) return arr N = int(input()) A = ...
Traceback (most recent call last): File "/tmp/tmpziuplj7s/tmp38ljl8e7.py", line 17, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s869515605
p02574
u543016260
1598910864
Python
Python (3.8.2)
py
Runtime Error
2208
132628
1380
import sys import math N=int(input()) A=list(map(int,input().split())) def sieve_of_eratosthenes(n): #エラトステネスのふるい if n==2: return [2] else: candidate = list(range(2, n+1)) #候補 prime = [] limit = n**0.5 + 1 #+1がないと平方数を素数にしてしまう while True: p = candidate[0...
Traceback (most recent call last): File "/tmp/tmpyj40c_o8/tmphpgc6q5m.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s694487128
p02574
u543016260
1598910669
Python
Python (3.8.2)
py
Runtime Error
2128
132636
1250
import sys import math N=int(input()) A=list(map(int,input().split())) def sieve_of_eratosthenes(n): #エラトステネスのふるい candidate = list(range(2, n+1)) #候補 prime = [] limit = n**0.5 + 1 #+1がないと平方数を素数にしてしまう while True: p = candidate[0] if limit <= p: prime.extend(candidate) #この時...
Traceback (most recent call last): File "/tmp/tmp_ed08zrl/tmpb9c8be47.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s324492394
p02574
u314089899
1598910508
Python
PyPy3 (7.3.0)
py
Runtime Error
450
241564
2032
import math import sys from functools import lru_cache sys.setrecursionlimit(10000000) N = int(input()) A_list = [int(e) for e in input().split()] #pairwise coprime …… 素因数分解したとき、共通のものが1個もない #setwise coprime …… 素因数分解したとき、全てで共通のものがない #試し割の結果の辞書を求める def make_trial_division_dict(n): #import math td_dict = dict()...
Traceback (most recent call last): File "/tmp/tmp2veenpq_/tmpb59unzpe.py", line 6, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s648381988
p02574
u850390157
1598909857
Python
Python (3.8.2)
py
Runtime Error
2210
134916
964
import math from functools import reduce N = int(input()) A = list(map(int, input().split())) max_A = max(A) sqrt_max_A = max_A ** 0.5 sieve = list(range(2, max_A+1)) prime = list(range(max_A+1)) while True: p = sieve[0] prime[p]= p if p > sqrt_max_A: break new_sieve = [] for s in sieve: ...
Traceback (most recent call last): File "/tmp/tmpyhqurkp0/tmp4gong_t5.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s574084089
p02574
u314089899
1598909382
Python
Python (3.8.2)
py
Runtime Error
2211
233620
1801
import math import sys from functools import lru_cache sys.setrecursionlimit(10000000) N = int(input()) A_list = [int(e) for e in input().split()] #pairwise coprime …… 素因数分解したとき、共通のものが1個もない #setwise coprime …… 素因数分解したとき、全てで共通のものがない #試し割の結果の辞書を求める def make_trial_division_dict(n): #import math td_dict = dict()...
Traceback (most recent call last): File "/tmp/tmpccmfw73l/tmpsjbxbwko.py", line 6, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s387031979
p02574
u314089899
1598909358
Python
Python (3.8.2)
py
Runtime Error
31
9344
1804
import math import sys from functools import lru_cache sys.setrecursionlimit(10000000000) N = int(input()) A_list = [int(e) for e in input().split()] #pairwise coprime …… 素因数分解したとき、共通のものが1個もない #setwise coprime …… 素因数分解したとき、全てで共通のものがない #試し割の結果の辞書を求める def make_trial_division_dict(n): #import math td_dict = dic...
Traceback (most recent call last): File "/tmp/tmpqbjgn_hw/tmpa_i7grrt.py", line 4, in <module> sys.setrecursionlimit(10000000000) OverflowError: Python int too large to convert to C int
s319849595
p02574
u314089899
1598909272
Python
Python (3.8.2)
py
Runtime Error
2212
236628
1800
import math import sys from functools import lru_cache sys.setrecursionlimit(1000000) N = int(input()) A_list = [int(e) for e in input().split()] #pairwise coprime …… 素因数分解したとき、共通のものが1個もない #setwise coprime …… 素因数分解したとき、全てで共通のものがない #試し割の結果の辞書を求める def make_trial_division_dict(n): #import math td_dict = dict() ...
Traceback (most recent call last): File "/tmp/tmpd_99v3ke/tmp2qv5cpzx.py", line 6, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s918874644
p02574
u045089547
1598906962
Python
Python (3.8.2)
py
Runtime Error
126
90564
484
def find_gcd(x, y): while (y): x, y = y, x % y return x def fun(l): num1=l[0] num2=l[1] gcd=find_gcd(num1,num2) for i in range(len(l)-1): gcd=find_gcd(l[i],l[i+1]) if gcd!=1: break; else: print("pairwise coprime") return 1 for i in range(2,len(l)): gcd=find...
Traceback (most recent call last): File "/tmp/tmp8fh0j9xt/tmpnl98uf8z.py", line 23, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s064050214
p02574
u045089547
1598906739
Python
Python (3.8.2)
py
Runtime Error
125
90936
484
def find_gcd(x, y): while (y): x, y = y, x % y return x def fun(l): num1=l[0] num2=l[1] gcd=find_gcd(num1,num2) for i in range(len(l)-1): gcd=find_gcd(l[i],l[i+1]) if gcd!=1: break; else: print("pairwise coprime") return 1 for i in range(2,len(l)): gcd=find...
Traceback (most recent call last): File "/tmp/tmpcwyrwm5u/tmpz3hx3m7l.py", line 23, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s515545124
p02574
u576432509
1598906075
Python
PyPy3 (7.3.0)
py
Runtime Error
258
182132
1808
import math search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 number= search_list[-1]-1 while search_list[0] <= math.sqrt(number): # while search_list[0]**2 <= number: #search_listの先頭の値が√nの値を超え...
Traceback (most recent call last): File "/tmp/tmp3mdnr_9y/tmp6q685zog.py", line 35, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s384720798
p02574
u576432509
1598905903
Python
PyPy3 (7.3.0)
py
Runtime Error
252
182268
1793
import math search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 number= search_list[-1]-1 while search_list[0] <= math.sqrt(number): # while search_list[0]**2 <= number: #search_listの先頭の値が√nの値を超えた...
Traceback (most recent call last): File "/tmp/tmp0zl8k__f/tmp2d7r_w4_.py", line 34, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s784912038
p02574
u576432509
1598905790
Python
PyPy3 (7.3.0)
py
Runtime Error
258
182116
1792
import math search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 number= search_list[-1] while search_list[0] <= math.sqrt(number): # while search_list[0]**2 <= number: #search_listの先頭の値が√nの値を超えたら...
Traceback (most recent call last): File "/tmp/tmpt7ivs9x3/tmpys948h3d.py", line 35, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s121862763
p02574
u576432509
1598905583
Python
PyPy3 (7.3.0)
py
Runtime Error
395
182104
1781
search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 # while search_list[0] <= math.sqrt(number): number= search_list[-1]+1 while search_list[0]**2 <= number: #search_listの先頭の値が√nの値を超えたら終了 #s...
Traceback (most recent call last): File "/tmp/tmp9nhqi809/tmp_niv46yn.py", line 33, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s113580025
p02574
u576432509
1598905512
Python
PyPy3 (7.3.0)
py
Runtime Error
267
182316
1780
search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 # while search_list[0] <= math.sqrt(number): number= search_list[-1] while search_list[0]**2 <= number: #search_listの先頭の値が√nの値を超えたら終了 #se...
Traceback (most recent call last): File "/tmp/tmpv8pxmgff/tmpgui75mo9.py", line 34, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s556053284
p02574
u576432509
1598905333
Python
PyPy3 (7.3.0)
py
Runtime Error
271
181400
1760
search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 # while search_list[0] <= math.sqrt(number): while search_list[0]**2 <= search_list[-1]: #search_listの先頭の値が√nの値を超えたら終了 #search_listの先頭をprime_l...
Traceback (most recent call last): File "/tmp/tmpq5bar_4u/tmprtn19sfv.py", line 32, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s951811401
p02574
u576432509
1598905268
Python
PyPy3 (7.3.0)
py
Runtime Error
88
74700
1760
search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 # while search_list[0] <= math.sqrt(number): while search_list[0]**2 <= search_list[-1]: #search_listの先頭の値が√nの値を超えたら終了 #search_listの先頭をprime_...
File "/tmp/tmph_ihhqq6/tmp0qzzsr7f.py", line 45 if len(bp)>: ^ SyntaxError: invalid syntax
s182904975
p02574
u576432509
1598905126
Python
PyPy3 (7.3.0)
py
Runtime Error
249
181572
1739
search_list = [] def get_primenumber(search_list):#エラトステネスの篩 prime_list = [] # search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 # while search_list[0] <= math.sqrt(number): while search_list[0]**2 <= search_list[-1]: #search_listの先頭の値が√nの値を超えたら終了 #search_listの先頭をprime_...
Traceback (most recent call last): File "/tmp/tmpooqjqe_u/tmpkcl0359m.py", line 33, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s763425505
p02574
u829796346
1598904453
Python
PyPy3 (7.3.0)
py
Runtime Error
483
203736
1596
#!/usr/bin/env pypy3 # N,M = map(int,sys.stdin.readline().split()) # a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param # a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param # a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)...
Traceback (most recent call last): File "/tmp/tmp981gpvg9/tmpwc5jzky9.py", line 11, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s178004684
p02574
u189023301
1598904155
Python
PyPy3 (7.3.0)
py
Runtime Error
97
74796
535
from math import gcd n = int(input()) s = list(map(int, input().split())) s.sort() dp = [0] * ((10 ** 6) + 100) res = s[0] for ss in s: dp[ss] += 1 lf res != 1: continue else: res = gcd(res, ss) A = max(s) pairwise = True setwise = (res == 1) for i in range(2, A + 1): cnt = 0 for j in...
File "/tmp/tmpc4c1ihzo/tmp3lhcv70p.py", line 10 lf res != 1: ^^^ SyntaxError: invalid syntax
s784925360
p02574
u576432509
1598901306
Python
PyPy3 (7.3.0)
py
Runtime Error
104
74584
1785
import sys def enum_div(n): ir=int(n**(0.5))+1 ret=[] for i in range(1,ir): if n%i == 0: ret.append(i) if (i!= 1) & (i*i != n): ret.append(n//i) return ret import math def get_primenumber(number):#エラトステネスの篩 prime_list = [] search_list = list(r...
Traceback (most recent call last): File "/tmp/tmp9lnr6acp/tmp1wmhtomq.py", line 33, in <module> p=get_primenumber(amax) ^^^^ NameError: name 'amax' is not defined. Did you mean: 'max'?
s305884501
p02574
u787059958
1598900229
Python
PyPy3 (7.3.0)
py
Runtime Error
2212
197660
1223
import math from functools import reduce from collections import deque N = int(input()) A = list(map(int, input().split())) def gcd_list(numbers): return reduce(math.gcd, numbers) max_A = max(A) # エラトステネスの篩により素数を高速で求める # そのかんにある数値がふるい落とされたその素数をメモしておく D = [0] * (max_A + 1) primes = list(range(2, max_A + 1)) pr...
Traceback (most recent call last): File "/tmp/tmpahry7nzb/tmpsimcz0xw.py", line 5, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s393334434
p02574
u787059958
1598899573
Python
Python (3.8.2)
py
Runtime Error
2209
135836
1215
import fractions from functools import reduce N = int(input()) A = list(map(int, input().split())) def gcd_list(numbers): return reduce(fractions.gcd, numbers) # print(gcd_list(A)) max_A = max(A) # エラトステネスの篩により素数を高速で求める # そのかんにある数値がふるい落とされたその素数をメモしておく D = [0] * (max_A + 1) primes = list(range(2, max_A + 1)) ...
Traceback (most recent call last): File "/tmp/tmpu4n874iy/tmpahwun3e2.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s517137426
p02574
u787059958
1598899362
Python
Python (3.8.2)
py
Runtime Error
2208
127792
1205
import math from functools import reduce N = int(input()) A = list(map(int, input().split())) def gcd_list(numbers): return reduce(math.gcd, numbers) # print(gcd_list(A)) max_A = max(A) # エラトステネスの篩により素数を高速で求める # そのかんにある数値がふるい落とされたその素数をメモしておく D = [0] * (max_A + 1) primes = list(range(2, max_A + 1)) prime = []...
Traceback (most recent call last): File "/tmp/tmphpqohm7r/tmp96635etp.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s594584705
p02574
u829796346
1598898971
Python
PyPy3 (7.3.0)
py
Runtime Error
162
74788
1552
#!/usr/bin/env pypy3 # N,M = map(int,sys.stdin.readline().split()) # a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param # a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param # a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)...
Traceback (most recent call last): File "/tmp/tmpm5ajw0nm/tmphzgh7zr0.py", line 11, in <module> n = int(sys.stdin.readline()) ^^^ NameError: name 'sys' is not defined
s031768846
p02574
u829796346
1598896123
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
207716
1898
#!/usr/bin/env pypy3 # N,M = map(int,sys.stdin.readline().split()) # a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param # a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param # a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)...
Traceback (most recent call last): File "/tmp/tmpu2wjs9q1/tmp5jyhn22w.py", line 11, in <module> N = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s222208317
p02574
u829796346
1598894717
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
227796
1788
#!/usr/bin/env pypy3 # N,M = map(int,sys.stdin.readline().split()) # a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param # a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param # a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)...
Traceback (most recent call last): File "/tmp/tmpbtn59zsn/tmpv5piyn36.py", line 11, in <module> N = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s891642828
p02574
u698868214
1598893872
Python
Python (3.8.2)
py
Runtime Error
2209
127796
1092
import math from functools import reduce def setwise_coprime_check(numbers): return reduce(math.gcd, numbers) def eratosthenes(max_A): A = [i for i in range(2, max_A + 1)] P = [] time = 0 while True: prime = min(A) if prime > math.sqrt(max_A): break P.append(prime) i = 0 while i...
Traceback (most recent call last): File "/tmp/tmp0__16wwg/tmpauxzbhbm.py", line 49, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s295114025
p02574
u829796346
1598893724
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
228340
1414
#!/usr/bin/env pypy3 # N,M = map(int,sys.stdin.readline().split()) # a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param # a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param # a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)...
Traceback (most recent call last): File "/tmp/tmpnld6uvtu/tmpy9t95o3t.py", line 11, in <module> N = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s301545519
p02574
u829796346
1598890634
Python
PyPy3 (7.3.0)
py
Runtime Error
364
198200
1607
#!/usr/bin/env python3 # N,M = map(int,sys.stdin.readline().split()) # a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param # a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param # a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(...
Traceback (most recent call last): File "/tmp/tmpnssge3kw/tmphajpsj4x.py", line 11, in <module> N = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s427779232
p02574
u698868214
1598887533
Python
Python (3.8.2)
py
Runtime Error
2209
150404
1173
import math import numpy as np from functools import reduce #GCD(A1 ~ AN)を出す def gcd_list(numbers): return reduce(math.gcd, numbers) #エラトネスの篩による素数列挙 def eratosthenes(limit): A = [i for i in range(2, limit+1)] P = [] time = 0 while True: prime = min(A) if prime > math.sqrt(limit): break ...
Traceback (most recent call last): File "/tmp/tmp4j1wxh9b/tmpt8pl__bl.py", line 44, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s033905950
p02574
u653837719
1598884687
Python
PyPy3 (7.3.0)
py
Runtime Error
258
181740
1073
from sys import exit from math import gcd def eratosthenes(n): ''' n以下の整数の素数判定/列挙 (n > 1) O(NloglogN) ''' is_prime = [True] * (n+1) is_prime[0] = False is_prime[1] = False min_factor = [-1] * (n+1) min_factor[0] = 0 min_factor[1] = 1 for i in range(2, n+1): if i...
Traceback (most recent call last): File "/tmp/tmpo2c2s6qk/tmpa64cukkr.py", line 27, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s490212802
p02574
u157232135
1598879860
Python
Python (3.8.2)
py
Runtime Error
236
127668
1832
from functools import lru_cache def main(): n=int(input()) a=list(map(int,input().split())) x=set() y=a[0] pair=True for i in a: if pair: p=set(prime_factorize(i)) if len(x&p)>0: pair=False x|=p y=math.gcd(y, i) if pair: ...
Traceback (most recent call last): File "/tmp/tmpplmb8f7z/tmpb4reag2o.py", line 71, in <module> main() File "/tmp/tmpplmb8f7z/tmpb4reag2o.py", line 4, in main n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s984219360
p02574
u157232135
1598873737
Python
Python (3.8.2)
py
Runtime Error
240
126944
870
import math def main(): n=int(input()) a=list(map(int,input().split())) ap=[set(prime_factorize(i)) for i in a] x=set() for i in ap: if len(x & i) > 0: break x |= i else: print("pairwise coprime") return x=a[0] for i in a: x = math.gcd(...
Traceback (most recent call last): File "/tmp/tmpwebq7s8i/tmpjdx72vbc.py", line 39, in <module> main() File "/tmp/tmpwebq7s8i/tmpjdx72vbc.py", line 3, in main n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s245735257
p02574
u157232135
1598873694
Python
Python (3.8.2)
py
Runtime Error
241
132736
452
import math def main(): n=int(input()) a=list(map(int,input().split())) ap=[set(prime_factorize(i)) for i in a] x=set() for i in ap: if len(x & i) > 0: break x |= i else: print("pairwise coprime") return x=a[0] for i in a: x = math.gcd(...
Traceback (most recent call last): File "/tmp/tmph9n3wsu5/tmpc_817y09.py", line 23, in <module> main() File "/tmp/tmph9n3wsu5/tmpc_817y09.py", line 3, in main n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s427270233
p02574
u045089547
1598873046
Python
Python (3.8.2)
py
Runtime Error
26
8940
2150
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef unsigned long long ull; # define M_PI 3.14159265358979323846 const int M=1e9+7; long long mod(long long x){ return ((x%M + M)%M); } long long add(long long a, long long b){ ...
File "/tmp/tmpphgqe6e7/tmpfr5k61b8.py", line 4 using namespace std; IndentationError: unexpected indent
s480464646
p02574
u446782476
1598870215
Python
PyPy3 (7.3.0)
py
Runtime Error
2212
259684
1502
# In[]: import math from functools import reduce # In[]: N = int(input()) input_str = input() input_list = input_str.split() input_int = [int(x) for x in input_list] # In[]: def get_sieve_of_eratosthenes(n): if not isinstance(n, int): raise TypeError('n is int type.') if n < 2: raise ValueEr...
Traceback (most recent call last): File "/tmp/tmps1j5ropr/tmp6oc3u0gk.py", line 7, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s754000007
p02574
u364693468
1598864232
Python
PyPy3 (7.3.0)
py
Runtime Error
458
227744
1671
import bisect, collections, copy, heapq, itertools, math, string import sys def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int, sys.stdin.readline().rstrip().split()) def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): r...
Traceback (most recent call last): File "/tmp/tmpc_12i0ww/tmpdmfmqj26.py", line 66, in <module> main() File "/tmp/tmpc_12i0ww/tmpdmfmqj26.py", line 30, in main N = I() ^^^ File "/tmp/tmpc_12i0ww/tmpdmfmqj26.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
s293080484
p02574
u364693468
1598864189
Python
PyPy3 (7.3.0)
py
Runtime Error
451
227728
1675
import bisect, collections, copy, heapq, itertools, math, string import sys def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int, sys.stdin.readline().rstrip().split()) def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): r...
Traceback (most recent call last): File "/tmp/tmpcah8v922/tmpv1z4cka2.py", line 66, in <module> main() File "/tmp/tmpcah8v922/tmpv1z4cka2.py", line 30, in main N = I() ^^^ File "/tmp/tmpcah8v922/tmpv1z4cka2.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
s735279884
p02574
u595905528
1598863847
Python
PyPy3 (7.3.0)
py
Runtime Error
899
195412
2673
import sys import bisect import itertools import collections import fractions import heapq import math from operator import mul from functools import reduce from functools import lru_cache def solve(): readline = sys.stdin.buffer.readline mod = 10 ** 9 + 7 N = int(input()) A = list(map(int, input().sp...
Traceback (most recent call last): File "/tmp/tmpzmx5mn1m/tmpec3arniu.py", line 99, in <module> solve() File "/tmp/tmpzmx5mn1m/tmpec3arniu.py", line 16, in solve N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s482198560
p02574
u595905528
1598863818
Python
PyPy3 (7.3.0)
py
Runtime Error
849
195300
2658
import sys import bisect import itertools import collections import fractions import heapq import math from operator import mul from functools import reduce from functools import lru_cache def solve(): readline = sys.stdin.buffer.readline mod = 10 ** 9 + 7 N = int(input()) A = list(map(int, input().sp...
Traceback (most recent call last): File "/tmp/tmpxxqabsmk/tmpqj58iymr.py", line 98, in <module> solve() File "/tmp/tmpxxqabsmk/tmpqj58iymr.py", line 16, in solve N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s025436398
p02574
u595905528
1598861528
Python
PyPy3 (7.3.0)
py
Runtime Error
346
195412
2385
import sys import bisect import itertools import collections import fractions import heapq import math from operator import mul from functools import reduce from functools import lru_cache def solve(): readline = sys.stdin.buffer.readline mod = 10 ** 9 + 7 N = int(input()) A = list(map(int, input().sp...
Traceback (most recent call last): File "/tmp/tmpohkj0y61/tmpm0qd2kuu.py", line 90, in <module> solve() File "/tmp/tmpohkj0y61/tmpm0qd2kuu.py", line 16, in solve N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s542060432
p02574
u212786022
1598837569
Python
Python (3.8.2)
py
Runtime Error
27
8948
728
N = int(input()) A = list(map(int,input().split())) M = 10**6 import math setwise = A[0] for i in range(1,N): setwise = math.gcd(setwise,A[i]) PrimeFactorss = [[] for _ in range(M+1)] for i in range(2, M+1): if len(PrimeFactorss[i]) == 0: for x in range(i, M+1, i): PrimeFactorss[x].a...
File "/tmp/tmp86da0yy2/tmpz7sevhrl.py", line 26 if num_list[i]==1: ^ IndentationError: expected an indented block after 'for' statement on line 25
s189878538
p02574
u212786022
1598837551
Python
Python (3.8.2)
py
Runtime Error
27
9088
727
N = int(input()) A = list(map(int,input().split())) M = 10**6 import math setwise = A[0] for i in range(1,N): setwise = math.gcd(setwise,A[i]) PrimeFactorss = [[] for _ in range(M+1)] for i in range(2, M+1): if len(PrimeFactorss[i]) == 0: for x in range(i, M+1, i): PrimeFactorss[x].a...
File "/tmp/tmp3i6unl3x/tmpv9ht_mf4.py", line 25 for j in range(i,M+1,i) ^ SyntaxError: expected ':'
s772858177
p02574
u550146922
1598837445
Python
PyPy3 (7.3.0)
py
Runtime Error
252
181748
511
n = int(input()) a = list(map(int,input().split())) import sys num = 10**2 li = [0]*num for k in a: if li[k-1]==0: li[k-1] += 1 else: if k-1!=0: print("not coprime") sys.exit() i=2 while i<=num: if sum([li[k*i-1] for k in range(1,num//i+1)])>1: break i+...
Traceback (most recent call last): File "/tmp/tmpuhsfbkae/tmpvq_47er2.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s450200456
p02574
u550146922
1598836568
Python
Python (3.8.2)
py
Runtime Error
290
127396
576
n = int(input()) a = list(map(int,input().split())) import sys import math import functools g = functools.reduce(math.gcd,a) num = 10**2 li = [0]*num for k in a: if li[k-1]==0: li[k-1] += 1 else: if k-1!=0: print("not coprime") sys.exit() i=2 while i<=num: #print...
Traceback (most recent call last): File "/tmp/tmpw4y6rpkx/tmpicsafx_a.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s410110885
p02574
u212786022
1598835645
Python
Python (3.8.2)
py
Runtime Error
407
126940
696
N = int(input()) A = list(map(int,input().split())) import math setwise = A[0] for i in range(1,N): setwise = math.gcd(setwise,A[i]) PrimeFactorss = [[] for _ in range(M+1)] for i in range(2, M+1): if len(PrimeFactorss[i]) == 0: for x in range(i, M+1, i): PrimeFactorss[x].append(i) M...
Traceback (most recent call last): File "/tmp/tmpq5mh_agg/tmpz9jfulog.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s929641875
p02574
u180172332
1598835087
Python
Python (3.8.2)
py
Runtime Error
237
133136
418
from collections import Counter n = int(input()) input_list = list(map(int,input().split())) num_count = Counter([prime for num in input_list for prime in prime_factorize(num)]) if len(num_count.values())==0: print("pairwise coprime") exit() max_appear = max(num_count.values()) if max_appear == 1: print("pa...
Traceback (most recent call last): File "/tmp/tmpeo7nb8_b/tmpq0gav5vy.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s328447746
p02574
u543000780
1598833987
Python
PyPy3 (7.3.0)
py
Runtime Error
91
74520
958
large = 10**6+1 furui = [True]*(large) prime_num = [] for num in range(large): if num in (0,1): furui[num] = False else: if furui[num]: times = 1 while num * times < large: if times == 1: prime_num.append(num) ...
File "/tmp/tmp0oq0xmvx/tmp_eaazj_j.py", line 21 if furui[element] = True: ^^^^^^^^^^^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s266343228
p02574
u543000780
1598833942
Python
PyPy3 (7.3.0)
py
Runtime Error
85
74712
958
large = 10**6+1 furui = [True]*(large) prime_num = [] for num in range(large): if num in (0,1): furui[num] = False else: if furui[num]: times = 1 while num * times < large: if times == 1: prime_num.append(num) ...
File "/tmp/tmpi_dxabdu/tmpgv0hd0r5.py", line 21 if furui[element] = True: ^^^^^^^^^^^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s253233736
p02574
u543000780
1598833890
Python
PyPy3 (7.3.0)
py
Runtime Error
358
94044
963
large = 10**6+1 furui = [True]*(large) prime_num = [] for num in range(large): if num in (0,1): furui[num] = False else: if furui[num]: times = 1 while num * times < large: if times == 1: prime_num.append(num) ...
File "/tmp/tmpsfy99y4i/tmp7ayed69r.py", line 21 if furui[element] = True: ^^^^^^^^^^^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s314834093
p02574
u855831834
1598833232
Python
Python (3.8.2)
py
Runtime Error
445
127464
836
n = int(input()) A = list(map(int,input().split())) def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent while b * b <= n: while n % b == 0: n = n // b e = e + 1 if e > 0: fct.append((b, e)) b, e = b + 1, 0 if n > 1: ...
Traceback (most recent call last): File "/tmp/tmppe0_mp81/tmpzvs1q470.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s805018187
p02574
u855831834
1598833102
Python
Python (3.8.2)
py
Runtime Error
460
126940
888
n = int(input()) A = list(map(int,input().split())) def factorization(n): arr = [] temp = n for i in range(2, int(-(-n**0.5//1))+1): if temp%i==0: cnt=0 while temp%i==0: cnt+=1 temp //= i arr.append([i, cnt]) if temp!=1: ...
Traceback (most recent call last): File "/tmp/tmpy3143ada/tmpz0zy0a7g.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s018801018
p02574
u817693991
1598832133
Python
Python (3.8.2)
py
Runtime Error
114
27188
1177
from math import gcd import numpy as np def setwise_coprime_check_fun(A_list, N): gcd_all = A_list[0] for i in range(N - 1): gcd_all = gcd(gcd_all, A_list[i + 1]) if gcd_all == 1: break return gcd_all def preprocess_fun(A_max): p_flg = [True] * (A_max + 1) D = [0] * (A_...
Traceback (most recent call last): File "/tmp/tmpfuizgdp_/tmpnp1gfhg2.py", line 38, in <module> A_max = max(A_list) ^^^^^^ NameError: name 'A_list' is not defined. Did you mean: 'list'?
s463806792
p02574
u817693991
1598831828
Python
Python (3.8.2)
py
Runtime Error
110
27016
1217
from math import gcd import numpy as np def setwise_coprime_check_fun(A_list, N): gcd_all = A_list[0] for i in range(N - 1): gcd_all = gcd(gcd_all, A_list[i + 1]) if gcd_all == 1: break return gcd_all def preprocess_fun(A_max): p_flg = [True] * (A_max + 1) D = [0] * (A_...
Traceback (most recent call last): File "/tmp/tmp5bcxrnx0/tmpzcf5zikp.py", line 40, in <module> A_max = max(A_list) ^^^^^^ NameError: name 'A_list' is not defined. Did you mean: 'list'?
s235732113
p02574
u522293645
1598831422
Python
Python (3.8.2)
py
Runtime Error
420
132628
1095
from math import gcd # Python3.6以降 # -------------------------------------------------------------- # n以下の素数列挙: O-nlogn # def primes(n): # prs = [] # is_prime = [True] * (n + 1) # is_prime[0] = False # is_prime[1] = False # for i in range(2, int(n**0.5)+1): # if not is_prime[i]: # ...
Traceback (most recent call last): File "/tmp/tmpe4q39ukn/tmpl_nvud7w.py", line 20, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s734953114
p02574
u446782476
1598829684
Python
Python (3.8.2)
py
Runtime Error
2210
151112
1572
# In[]: import math from functools import reduce # In[]: def gcd_list(numbers): return reduce(math.gcd, numbers) # In[]: N = int(input()) input_str = input() input_list = input_str.split() input_int = [int(x) for x in input_list] # In[]: def get_sieve_of_eratosthenes(n): if not isinstance(n, int): ...
Traceback (most recent call last): File "/tmp/tmphfy5t9s6/tmp31llyav7.py", line 12, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line