s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s840841612
p02548
u515638999
1600613417
Python
Python (3.8.2)
py
Runtime Error
29
8912
1241
#include<bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(a) (a).begin(),(a).end() #define sz(x) (int)x.size() #define F first #define S second #define endl "\n" #define inf (long long)1000000007 #de...
s419387104
p02548
u972991614
1600612656
Python
Python (3.8.2)
py
Runtime Error
29
9084
78
N = int(input()) ans = 0 for i in range(1,n): ans += (n-1) // i print(ans)
s284934186
p02548
u972991614
1600612608
Python
Python (3.8.2)
py
Runtime Error
24
9132
70
N = int(input()) for i in range(1,n): ans += (n-1) // i print(ans)
s700030689
p02548
u437215432
1600611485
Python
Python (3.8.2)
py
Runtime Error
24
8948
122
from sympy import divisor_count n = int(input) count = 0 for c in range(1, n): count += divisor_count(c) print(count)
s811932895
p02548
u437215432
1600611445
Python
Python (3.8.2)
py
Runtime Error
28
8968
90
n = int(input) count = 0 for c in range(1, n): count += divisor_count(c) print(count)
s553327335
p02548
u956259660
1600609521
Python
Python (3.8.2)
py
Runtime Error
1831
16652
269
import math t = 1 for tc in range(t): N = 1000005 div = [0] * N for i in range(1,N): for j in range(i,N,i): div[j] += 1 n = int(input()) ans = 0 for i in range(1,n): ans += div[n-c] print(ans)
s086124646
p02548
u441320782
1600609168
Python
Python (3.8.2)
py
Runtime Error
2272
2004924
173
import itertools N=int(input()) count=0 lis=[i for i in range(1,N+1)] x=list(itertools.product(lis,repeat=3)) for i in x: if y[0]*y[1]+y[2]==N: count+=1 print(count)
s714107330
p02548
u441320782
1600609129
Python
Python (3.8.2)
py
Runtime Error
28
9084
184
import itertolls N=int(input()) count=0 lis=[i for i in range(1,N+1)] x=list(itertools.product(lis,repeat=3)) for i in x: y=list(i) if y[0]*y[1]+y[2]==N: count+=1 print(count)
s606621236
p02548
u441320782
1600608946
Python
Python (3.8.2)
py
Runtime Error
82
48584
197
from itertools import product N=int(input()) count=0 lis=[i for i in range(1,N+1)] x=list(itertools.product(lis,repeat=3)) for i in x: y=list(i) if y[0]*y[1]+y[2]==N: count+=1 print(count)
s556518284
p02548
u645183909
1600602251
Python
Python (3.8.2)
py
Runtime Error
24
9084
130
case_num = 0 N = int(input()) for num in range(N - 1): num += 1 case_num += ( math.ceil(N / num) - 1 ) print(case_num)
s908036964
p02548
u645183909
1600601222
Python
Python (3.8.2)
py
Runtime Error
27
9164
161
N = int(input()) case_num += N / 2 half_num = case_num for num in range(half_num - 1): num += 1 case_num += ( math.ceil(N / num) - 1 ) print(case_num)
s031949155
p02548
u035453792
1600597402
Python
Python (3.8.2)
py
Runtime Error
24
9180
74
n = int(input()) ans=0 for i in range(1,n): ans+=int(cnt-1) print(ans)
s496031485
p02548
u035453792
1600596736
Python
Python (3.8.2)
py
Runtime Error
24
9084
12
import sympy
s050647668
p02548
u035453792
1600596584
Python
Python (3.8.2)
py
Runtime Error
25
9088
101
import sympy n = int(input()) ans=0 for i in range(1,n): ans+=len(sympy.divisors(n-i)) print(ans)
s516087467
p02548
u255943004
1600595158
Python
Python (3.8.2)
py
Runtime Error
25
9156
71
N = int(input()) ans = 0 for a in range(N): ans += (N//a) print(ans)
s336865264
p02548
u255943004
1600595077
Python
Python (3.8.2)
py
Runtime Error
26
9108
68
N = int(input()) ans = 0 for a in range(N): ans += N//a print(ans)
s637843751
p02548
u723345499
1600590228
Python
Python (3.8.2)
py
Runtime Error
25
8980
62
cnt = 0 for a in range(1, n): cnt +=(n -1)// a print(cnt)
s296938150
p02548
u075303794
1600586111
Python
PyPy3 (7.3.0)
py
Runtime Error
95
74752
66
N=int(input()) ans=0 for i in range(N): ans+=(N-1)//i print(ans)
s563780366
p02548
u932868243
1600583531
Python
Python (3.8.2)
py
Runtime Error
26
9028
71
n=it(input()) ans=0 for i in range(1,n): ans+=int((n-1)/i) print(ans)
s983679072
p02548
u742260762
1600583365
Python
Python (3.8.2)
py
Runtime Error
28
9136
72
N =int(input()) c = 0 for i in range(N): c += N-1//i+1 print(c)
s475072419
p02548
u742260762
1600583306
Python
Python (3.8.2)
py
Runtime Error
31
8952
72
N =int(input()) c = 0 for i in range(N): c += n-1//i+1 print(c)
s773998684
p02548
u872259176
1600569883
Python
Python (3.8.2)
py
Runtime Error
26
9032
172
n = int(input()) count = 0 for a in range(1,n): count += int((n-1)/a) print(count)n = int(input()) count = 0 for a in range(1,n): count += int((n-1)/a) print(count)
s000453231
p02548
u872259176
1600569192
Python
Python (3.8.2)
py
Runtime Error
26
9168
112
n = int(input()) count = 0 for c in range(n): ab = n - c if ab % a == 0: count += 1 print(count)
s446183755
p02548
u872259176
1600569086
Python
Python (3.8.2)
py
Runtime Error
24
9012
106
n = int(input()) count = 0 for c in range(n): ab = n - c if ab % a = 0: count += 1 print(count)
s624934736
p02548
u170349801
1600566990
Python
Python (3.8.2)
py
Runtime Error
26
9004
184
N = int(input()) count = 0 for i in range(1,int(N)): if int(N/i)-N/i == 0: count += int(N/i)-1 else: count += int(N/i) print(count)
s860164999
p02548
u170349801
1600562821
Python
Python (3.8.2)
py
Runtime Error
222
9508
765
N = int(input()) NR = int(N**0.5) count = 0 if int(N/2)-N/2 == 0: for i in range(1,int(N/2)): if int(N/i)-N/i == 0: count += int(N/i)-1 else: count += int(N/i) else: for i in range(1,int(N/2)+1): if int(N/i)-N/i == 0: count += int(N/i)-1 else: ...
s147231249
p02548
u589783652
1600559640
Python
PyPy3 (7.3.0)
py
Runtime Error
85
68540
74
N = int(input()) ans = 0 for i in range(1,N); ans += (N-1)//i print(ans)
s180780196
p02548
u256582236
1600559449
Python
Python (3.8.2)
py
Runtime Error
31
9072
130
import sympy n = int(input()) cnt = 0 for i in range(1, n): # print('i:', i) cnt += sympy.divisor_count(n - i) print(cnt)
s258806310
p02548
u609561564
1600554454
Python
Python (3.8.2)
py
Runtime Error
25
8980
81
N=int(input()) ans=1 for x in range(3,N+1): tmp=x-1 ans+=tmp//x print(ans)
s017955583
p02548
u463945054
1600551660
Python
Python (3.8.2)
py
Runtime Error
26
9124
84
N = int(input()) k=0 for s in range(1,N): k = (N-1) // s t += k print (t)
s544545334
p02548
u048004795
1600551557
Python
Python (3.8.2)
py
Runtime Error
30
9012
152
import sys import sympy import math input = sys.stdin.readline n = int(input()) ans = 0 for a in range(1,n+1): ans += (n-1) // a print(ans)
s965482019
p02548
u589783652
1600551531
Python
PyPy3 (7.3.0)
py
Runtime Error
95
76476
230
N = int(input()) def f(x): i = 1 count = 0 while i**2 < x: if x % i == 0: count += 2 i += 1 if i**2 == x: count += 1 return count dp = [0]*N for i in range(1,N): dp[i] = dp[i-1] + f[i+1] print(dp[N-1])
s540318347
p02548
u463945054
1600551467
Python
Python (3.8.2)
py
Runtime Error
32
9080
85
N = int(input()) k = 0 for s in range(1,N) : k = (N-1) // s t += k print(k)
s239628550
p02548
u882564128
1600550410
Python
Python (3.8.2)
py
Runtime Error
29
8956
152
n = int(input()) cnt = 0 for a in range(1,n): cnt += (n-1)//a print(cnt)n = int(input()) cnt = 0 for a in range(1,n): cnt += (n-1)//a print(cnt)
s928987662
p02548
u290887281
1600549219
Python
Python (3.8.2)
py
Runtime Error
2206
9084
127
n = int(input()) cnt = 0 for i in range(1, n): for j in range(1, n): if i * j <= n: cnt += 1 pritn(cnt)
s333551810
p02548
u463470469
1600548521
Python
Python (3.8.2)
py
Runtime Error
25
9004
272
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int ans = 0; for (int i = 0; i < N-1; i++) { for (int j = 0; j < i+1;j++){ if ((i+1)%(j+1) == 0) { ans += 2; } } } cout << ans; }
s220363429
p02548
u649769812
1600548263
Python
Python (3.8.2)
py
Runtime Error
157
9064
162
N = int(input()) ans = 0 for i in range(1, N): ans += (N-1) // i print(ans) N = int(input()) ans = 0 for i in range(1, N): ans += (N-1) // i print(ans)
s574801968
p02548
u273914730
1600548038
Python
Python (3.8.2)
py
Runtime Error
38
9112
163
S=list(map(int,input().split())) a=[S[1]] for i in range(0,S[0]-1): while a[i]>2*S[2]: a[i]=a[i]-S[2] a.append(((a[i])**2)%S[2]) print(sum(a))
s164964315
p02548
u983357959
1600548016
Python
Python (3.8.2)
py
Runtime Error
26
8928
157
N = int(input()) for i in range(N): N_1 = N-(i+1) for j in range(N_1): if N_1%(j+1) ==0: count +=2 else: pass
s922354708
p02548
u297089927
1600548016
Python
Python (3.8.2)
py
Runtime Error
233
9184
119
n=int(input()) g=lambda x:(x*(n//x)*(n//x+1))//2 print(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1))))
s071473148
p02548
u967414299
1600548004
Python
Python (3.8.2)
py
Runtime Error
27
8964
401
import sympy def couples(num: int) -> int: p_g = set(sympy.primerange(1, num - 1)) def f(): for i in range(num - 1): n = i + 1 if n in p_g: yield 2 continue yield sympy.divisor_count(i + 1) return sum(f()) def main(): num ...
s470999844
p02548
u751717561
1600547994
Python
Python (3.8.2)
py
Runtime Error
30
9416
60
n = int(input()) ans = 0 print((n-1)+len(range(n**(1/2))))
s964941133
p02548
u909224749
1600547993
Python
Python (3.8.2)
py
Runtime Error
2229
699672
252
import sys sys.setrecursionlimit(10000000) N = int(input()) pair = set() def pair_divs(a, b, N): if a * b <= N: pair.add((a,b)) pair_divs(a+1, b, N) pair_divs(a, b+1, N) else: return pair_divs(1, 1, N-1) print(len(pair))
s173348013
p02548
u297089927
1600547989
Python
Python (3.8.2)
py
Runtime Error
29
8940
118
n=int(input()) g=lambda x:(x*(n//x)*(n//x+1))//2 print(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1)))
s758600840
p02548
u561294476
1600547982
Python
Python (3.8.2)
py
Runtime Error
31
9112
375
import math N = int(input()) ans = 0 for A in range(1, N): for B in range(1, N): if A >= math.sqrt(N) and B >= math.sqrt(N): ans2 = ans + 1 - A*B return if A * B < N: # 大きさ比較なので計算早いか? ans += 1 else: break # 値大きくなったらもう次のAに print(ans + ans2...
s531039080
p02548
u476068053
1600547950
Python
PyPy3 (7.3.0)
py
Runtime Error
125
68644
247
import math import sympy def main(): n = int(input()) dp = [0] * (n+1) dp[0] = 0 dp[1] = 0 for i in range(2, n+1): dp[i] = dp[i-1] + sympy.divisor_count(i-1) print(dp[-1]) if __name__ == '__main__': main()
s570915449
p02548
u140513568
1600547940
Python
PyPy3 (7.3.0)
py
Runtime Error
101
68724
196
N = int(input()) count = 0 for C in range(0, N+1): for A in range(0, N-C+1): if (N-C)%A == 0: B = (N-C)/A if A*B-C == N: count += 1 print(count)
s583064093
p02548
u476068053
1600547929
Python
Python (3.8.2)
py
Runtime Error
24
9028
247
import math import sympy def main(): n = int(input()) dp = [0] * (n+1) dp[0] = 0 dp[1] = 0 for i in range(2, n+1): dp[i] = dp[i-1] + sympy.divisor_count(i-1) print(dp[-1]) if __name__ == '__main__': main()
s500909379
p02548
u972658925
1600547918
Python
PyPy3 (7.3.0)
py
Runtime Error
101
74708
566
from sympy import isprime n = int(input()) lst_c = [] for c in range(1,n): #c != n lst_c.append(n-c) for i in range(len(lst_c)): if isprime(lst_c[i]): lst_c[i] = 1 #print(lst_c) cnt = 0 cnt2 = 0 for i in range(len(lst_c)): if lst_c[i] != 1: for j in range(1,int(lst_c[i]**0.5)+1): ...
s041588691
p02548
u827261928
1600547877
Python
Python (3.8.2)
py
Runtime Error
25
9020
96
import sympy N=int(input()) s=0 for i in range(N-1,0,-1): s+=sympy.divisor_count(i) print(s)
s865271922
p02548
u048800107
1600547870
Python
Python (3.8.2)
py
Runtime Error
28
9036
120
import sympy n = int(input()) cnt = 0 for i in range(n-1): cnt += sympy.divisor_count(i+1) print(cnt)
s343540879
p02548
u421693050
1600547863
Python
Python (3.8.2)
py
Runtime Error
618
643240
181
import sys,math sys.setrecursionlimit(10**9+7) n=int(input()) def A(a,count): if a>n: print(count) elif n%a==0: A(a+1,count+int(n//a)-1) else: A(a+1,count+int(n//a)) A(1,0)
s318490942
p02548
u514343483
1600547862
Python
Python (3.8.2)
py
Runtime Error
27
9040
99
import sympy N=int(input()) num=0 for c in range(1,N): num+=len(sympy.divisors(N-c)) print(num)
s204273910
p02548
u561294476
1600547849
Python
Python (3.8.2)
py
Runtime Error
1942
9108
391
import math N = int(input()) ans = 0 for A in range(1, N): for B in range(1, N): if A >= math.sqrt(N) and B >= math.sqrt(N): ans2 = ans + 1 - A*B print(ans + ans2) sys.exit() if A * B < N: # 大きさ比較なので計算早いか? ans += 1 else: break ...
s684976270
p02548
u827261928
1600547843
Python
PyPy3 (7.3.0)
py
Runtime Error
91
68652
96
import sympy N=int(input()) s=0 for i in range(N-1,0,-1): s+=sympy.divisor_count(i) print(s)
s898824183
p02548
u421693050
1600547828
Python
Python (3.8.2)
py
Runtime Error
651
643252
173
import sys,math sys.setrecursionlimit(10**9+7) n=int(input()) def A(a,count): if a>n: print(count) elif n%a==0: A(a+1,count+(n//a)-1) else: A(a+1,count+n//a) A(1,0)
s268494753
p02548
u048800107
1600547819
Python
Python (3.8.2)
py
Runtime Error
30
9092
120
import sympy n = int(input()) cnt = 0 for i in range(n-1): cnt += sympy.divisor_count(i+1) print(cnt)
s722046188
p02548
u693007703
1600547814
Python
Python (3.8.2)
py
Runtime Error
23
9092
139
import sympy N = int(input()) output = 0 for i in range(1, N): count = sympy.divisor_count(i) output += count print(output)
s905362749
p02548
u827261928
1600547804
Python
PyPy3 (7.3.0)
py
Runtime Error
94
74752
91
import sympy N=int(input()) s=0 for i in range(N-1,0,-1): s+=sympy.divisors(i) print(s)
s786354925
p02548
u972658925
1600547773
Python
Python (3.8.2)
py
Runtime Error
28
9024
566
from sympy import isprime n = int(input()) lst_c = [] for c in range(1,n): #c != n lst_c.append(n-c) for i in range(len(lst_c)): if isprime(lst_c[i]): lst_c[i] = 1 #print(lst_c) cnt = 0 cnt2 = 0 for i in range(len(lst_c)): if lst_c[i] != 1: for j in range(1,int(lst_c[i]**0.5)+1): ...
s460012182
p02548
u813890414
1600547695
Python
Python (3.8.2)
py
Runtime Error
28
8892
131
import sympy N = int(input()) counter = 0 for i in range(1,N): AB = N - i counter += len(sympy.divisors(AB)) print(counter)
s396804225
p02548
u186020592
1600547686
Python
Python (3.8.2)
py
Runtime Error
22
9120
119
import sympy N = int(input()) count = 0 for j in range(N-2): count +=len(sympy.divisors(j+2)) print(count+1)
s374893062
p02548
u200646150
1600547683
Python
Python (3.8.2)
py
Runtime Error
31
8960
118
import sympy N=int(input()) count=0 for C in range(1,N): A=sympy.divisor_count(N-C) count=count+A print(count)
s512478942
p02548
u723345499
1600547673
Python
Python (3.8.2)
py
Runtime Error
28
9132
138
n = int(input()) cnt = 0 for r in range(1, n): for a in range(1, (a // 2) +1): if r % a == 0: cnt += 1 print(cnt)
s663989266
p02548
u200646150
1600547662
Python
Python (3.8.2)
py
Runtime Error
33
9104
118
import sympy N=int(input()) count=0 for C in range(1,N): A=sympy.divisor_count(N-C) count=count+A print(count)
s188028168
p02548
u359752656
1600547569
Python
Python (3.8.2)
py
Runtime Error
25
9064
133
import sympy N = int(input()) count = 0 for C in range(1, N): AB = N - C count = count + len(sympy.divisors(AB)) print(count)
s375187746
p02548
u768636516
1600547528
Python
PyPy3 (7.3.0)
py
Runtime Error
96
68580
199
N = int(input()) count = 0 for X in range(N): for i in range(1, int(X**0.5)+1): if X % i == 0: count += 1 if i != X // i: count += 1 print(count)
s075658334
p02548
u273914730
1600547265
Python
Python (3.8.2)
py
Runtime Error
32
9024
258
N=int(input()) while N>=1: u=0 y=0 for A in range(1,round(N**0.5)): if N%A==0: if N**0.5==A: y=1 u=u+1 N=N-1 else: u=u+1 N=N-1 else: N=N-1 if y==1: print(2u-1) else: print(2u)
s191209796
p02548
u095658362
1600547201
Python
PyPy3 (7.3.0)
py
Runtime Error
2209
166756
551
import math n = int(input()) c = 3 ans = 0 a = [0 for i in range(n-2)] d = [0 for i in range(n+1)] d[1] = 1 for i in range(2,n+1): for j in range(2,i): if i%j==0: if j*j == i: d[i] = d[j]*2 - 1 else: if (i/j)%j == 0: d[i] = d[j]*d[i...
s212324015
p02548
u813890414
1600547195
Python
Python (3.8.2)
py
Runtime Error
28
8924
131
import sympy N = int(input()) counter = 0 for i in range(1,N): AB = N - i counter += len(sympy.divisors(AB)) print(counter)
s979057804
p02548
u094839773
1600547162
Python
Python (3.8.2)
py
Runtime Error
27
9024
111
import sympy _a =int( input()) _count=0 for i in range(_a): _count+=len(sympy.divisors(i)) print(_count)
s094668532
p02548
u822090837
1600547090
Python
Python (3.8.2)
py
Runtime Error
30
9080
589
N=int(input()) count=0 def search_divisor_num_1(num): if num < 0: return None elif num == 1: return 1 else: num_sqrt = math.floor(math.sqrt(num)) prime_list = make_prime_list_2(num_sqrt) divisor_num = 1 for prime in prime_list: count = 1 ...
s551277492
p02548
u660472825
1600547082
Python
Python (3.8.2)
py
Runtime Error
24
9008
154
n = int(input()) import sympy count = 0 for i in range(0, n-2): n = n - i ni = sympy.divisors(n) print(ni) count += len(ni) print(count+1)
s489822716
p02548
u194228880
1600546985
Python
Python (3.8.2)
py
Runtime Error
29
9132
417
import sympy def divisor(n): cnt=0 i = 1 while i**2 <= n: if n%i == 0: if i==n//i: cnt+=1 else: cnt+=2 i += 1 return cnt n = int(input('')) result=0 for c in range(1,n): n2 = n-c # div = divisor(n2) # print("{}->{}".fo...
s840796741
p02548
u179411549
1600546978
Python
PyPy3 (7.3.0)
py
Runtime Error
89
68692
48
A, B, C, N = int(input()) N = A * B + C print(N)
s044870883
p02548
u673101577
1600546970
Python
Python (3.8.2)
py
Runtime Error
28
9064
405
# from pprint import pprint # import math # import collections import sympy N = int(input()) # N = 1000000 # N = 3 # n, k = map(int, input().split(' ')) # a = list(map(int, input().split(' '))) yaku_kosu = [1] * N for ab in range(1, N): if ab > 1: yaku_kosu[ab] += 1 j = 2 while ab * j <...
s928304012
p02548
u428699622
1600546955
Python
PyPy3 (7.3.0)
py
Runtime Error
111
73100
335
N=int(input()) def prod_comb(n): A=list() c=0 for i in range(1,n+1): a=int(n/i) for j in range(1,a+1): A.append(int(i*j)) for s in A: if s==n: c+=1 return c def B(n): if n>=2: return B(n-1)+prod_comb(n-1) if n==1: retur...
s400616819
p02548
u951280598
1600546933
Python
Python (3.8.2)
py
Runtime Error
26
9024
172
import sympy n=int(input()) count = 0 for i in range(1,n): l = len(sympy.divisors(i)) if l%2==1: count+=1+(l//2)*2 else: count+=l print(count)
s250569490
p02548
u081141316
1600546928
Python
Python (3.8.2)
py
Runtime Error
25
9004
107
import sympy N = int(input()) ans = 1 for i in range(2, N): ans += len(sympy.divisors(i)) print(ans)
s481122942
p02548
u244836567
1600546891
Python
Python (3.8.2)
py
Runtime Error
25
9156
94
a=int(input()) b=0 for i in range(a): for k in range(i): if i%k==0: b=b+1 print(b)
s947102273
p02548
u273914730
1600546752
Python
Python (3.8.2)
py
Runtime Error
24
8968
212
S=list(map(int,input().split())) a=[S[1]] for i in range(0,S[0]-1): if a[i]**2>10**9+7: a.append(((a[i]**2)%(10**9+7))%S[2]) else: a.append(((a[i]**2)%S[2]) print(sum(a))
s413656093
p02548
u951280598
1600546660
Python
Python (3.8.2)
py
Runtime Error
26
9064
171
import sympy n=int(input()) count = 0 for i in range(1,n): l = len(sympy.divisors(i)) if l%2==1: count+=1+(l//2)*2 else: count+=l print(count)
s708003984
p02548
u273914730
1600546658
Python
Python (3.8.2)
py
Runtime Error
26
9088
130
S=list(map(int,input().split())) a=[S[1]] for i in range(0,S[0]-1): a.append(((a[i]**2)%(10**9+7))%S[2]) print(sum(a))
s409492189
p02548
u559367141
1600546648
Python
Python (3.8.2)
py
Runtime Error
26
9128
321
if N < 100: for i in range(1,N): for j in range(1,N): for k in range(1,N): if i*j + k == N: count += 1 else: for i in range(1,N): for j in range(1,N//i): c = N - i*j if 1 <= c <= 1000000: count += 1 print(count...
s839763108
p02548
u678128840
1600546545
Python
Python (3.8.2)
py
Runtime Error
2206
9252
918
def make_divisors(n): cnt = 0 i = 1 while i*i <= n: if n % i == 0: cnt += 1 if i != n // i: cnt += 1 i += 1 return cnt numbers = [1,10, 100, 1000, 10000, 100000, 200000, 250000,300000,350000, 400000,450000, 500000,750000,1000000] datas = [0,23,473,...
s439602746
p02548
u221272125
1600546483
Python
Python (3.8.2)
py
Runtime Error
30
9232
532
N = int(input()) 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: arr.append([temp, 1]) if arr...
s845466749
p02548
u235837041
1600546440
Python
Python (3.8.2)
py
Runtime Error
173
9156
302
x = int(input()) for a in range(1, x+1): for b in range(1, x+1): if a * b >= x: pass else: for c in range(1, x+1): kai = (a * b) + c if kai == x: #print(a,b,c) cnt += 1 print(cnt)
s313065866
p02548
u662762430
1600546380
Python
Python (3.8.2)
py
Runtime Error
25
9064
585
import sympy N = int(input()) # N = 100 def make_divisors(n): lower_divisors, upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_d...
s390780411
p02548
u889282850
1600546375
Python
Python (3.8.2)
py
Runtime Error
133
27160
427
import numpy as np N = input() rN = int(np.sqrt(N)) setN = 0 for c in range(1, N): for a in range(1, rN+1): b = (N-c)/a if b == int(b): if a*a == N-c: setN += 1 #print(a, a, c, N-c) elif b > rN: setN += 2 #print(...
s958641086
p02548
u473234868
1600546358
Python
Python (3.8.2)
py
Runtime Error
24
9144
261
n = int(input()) import math def num_divisors(prime_count): num = 1 for prime, count in prime_count.iteritems(): num *= (count + 1) return num total = 0 for i in range(1,n): c = n-i total += num_divisors(n-i) print(total)
s414247689
p02548
u560222605
1600546281
Python
Python (3.8.2)
py
Runtime Error
24
9076
95
n=int(input()) import sympy a=0 for i in range(1,n): a+=sympy.divisor_count(i) print(a)
s672633825
p02548
u895536501
1600546189
Python
Python (3.8.2)
py
Runtime Error
29
9092
103
import sympy N=int(input()) count=0 for i in range(1,N): count+=sympy.divisor_count(i) print(count)
s167217699
p02548
u508960292
1600546165
Python
Python (3.8.2)
py
Runtime Error
26
9032
205
#C # 与えられた数字までの数字の約数をカウントする。 import sympy N = int(input()) counter = 0 for i in range(1,N): counter = counter + int(sympy.divisor_count(i)) print(counter)
s575094642
p02548
u075317232
1600546077
Python
Python (3.8.2)
py
Runtime Error
27
9008
276
import sympy def ProgramC(): num = int(input()) count = 0 for i in range(num-1): a_b = num - (i + 1) count = count + len(sympy.divisors(a_b)) print(count) if __name__ == '__main__': ProgramC()
s335818623
p02548
u658181634
1600546046
Python
Python (3.8.2)
py
Runtime Error
28
9088
205
import sympy cnt = 0 for C in range(1, N): div = sympy.divisors(N-C) cnt += len(div) # if len(div) % 2 == 0: # cnt += len(div) # else: # cnt += 2 * len(div) - 1 print(cnt)
s163013776
p02548
u221272125
1600546037
Python
Python (3.8.2)
py
Runtime Error
32
9168
226
def num_divisors(prime_count): num = 1 for prime, count in prime_count.iteritems(): num *= (count + 1) return num N = int(input()) ans = 1 for i in range(2,N): ans += um_divisors(i) print(ans)
s607993862
p02548
u087118202
1600546030
Python
Python (3.8.2)
py
Runtime Error
26
9092
115
import sympy n=int(input()) abc=n ans=0 for c in range(1,n): ab=abc-c ans+=len(sympy.divisors(ab)) print(ans)
s706320151
p02548
u412863850
1600546003
Python
Python (3.8.2)
py
Runtime Error
35
10092
1243
import sys import re import queue import collections import math import sympy from math import ceil, floor, sqrt, pi, factorial, gcd from copy import deepcopy from collections import Counter, deque from heapq import heapify, heappop, heappush from itertools import accumulate, product, combinations, combinations_with_re...
s065982919
p02548
u485435834
1600545921
Python
Python (3.8.2)
py
Runtime Error
30
9224
517
import sys input = sys.stdin.readline N, K = map(int, input().split()) L = [list(map(int, input().split())) for _ in range(K)] S = [] for left, right in L: S.extend(range(left, right+1)) S = sorted(list(set(S))) n_list = [0] * N n_list[0] = 1 for idx, value in enumerate(n_list): if value == 0: co...
s105543371
p02548
u451122856
1600545920
Python
PyPy3 (7.3.0)
py
Runtime Error
2212
3526104
2678
def SieveOfEratosthenes(n, prime, primesquare, a): # Create a boolean array "prime[0..n]" # and initialize all entries it as # true. A value in prime[i] will finally # be false if i is not a prime, else true. for i in range(2, n + 1): prime[i] = True # Create a boolean array "primesquar...