Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02660
x = int(input()) import math from collections import defaultdict res = 0 value = defaultdict(int) def isprime(n): if n <= 1: return 0 m = int(math.sqrt(n)) + 1 for i in range(2, m): if n % i == 0: return 0 return 1 if isprime(x): print(1) else: def bprime(n): ...
x = int(input()) import math from collections import defaultdict res = 0 value = defaultdict(int) def isprime(n): if n <= 1: return 0 m = int(math.sqrt(n)) + 1 for i in range(2, m): if n % i == 0: return 0 return 1 if isprime(x): print(1) else: def bprime(n): ...
[ "control_flow.branch.if.condition.change" ]
384,900
384,901
u455629561
python
p02660
import collections def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a def main(): n = int(in...
import collections def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a def main(): n = int(in...
[ "control_flow.loop.for.condition.change" ]
384,908
384,909
u135847648
python
p02660
import random import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) retur...
import random import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) retur...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.change" ]
384,914
384,915
u663438907
python
p02660
import random import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) retur...
import random import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) retur...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.change" ]
384,916
384,915
u663438907
python
p02660
N = int(input()) if N == 1: print("0") exit() def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) r...
N = int(input()) if N == 1: print("0") exit() def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) r...
[ "literal.number.integer.change", "assignment.value.change", "control_flow.loop.condition.change" ]
384,928
384,929
u315354220
python
p02660
n = int(input()) def divisorize(fct): b, e = fct.pop() # base, exponent pre_div = divisorize(fct) if fct else [[]] suf_div = [[(b, k)] for k in range(e + 1)] return [pre + suf for pre in pre_div for suf in suf_div] def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent ...
n = int(input()) def divisorize(fct): b, e = fct.pop() # base, exponent pre_div = divisorize(fct) if fct else [[]] suf_div = [[(b, k)] for k in range(e + 1)] return [pre + suf for pre in pre_div for suf in suf_div] def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent ...
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
384,933
384,934
u646892595
python
p02660
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_divisors[::-1] def factorization(n): ...
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_divisors[::-1] def factorization(n): ...
[ "call.remove" ]
384,935
384,936
u382407432
python
p02660
def seachPrimeNum(N): max = int(N ** (1/2)) seachList = [i for i in range(2,N+1)] primeNum = [] while seachList[0] <= max: primeNum.append(seachList[0]) tmp = seachList[0] seachList = [i for i in seachList if i % tmp != 0] primeNum.extend(seachList) return primeNum a = s...
def seachPrimeNum(N): max = int(N ** (1/2)) seachList = [i for i in range(2,N+1)] primeNum = [] while seachList[0] <= max: primeNum.append(seachList[0]) tmp = seachList[0] seachList = [i for i in seachList if i % tmp != 0] primeNum.extend(seachList) return primeNum a = s...
[ "expression.operation.binary.add" ]
384,953
384,954
u112007848
python
p02660
import collections import numpy as np def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a N = i...
import collections import numpy as np def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a N = i...
[ "call.add", "call.arguments.change" ]
384,971
384,972
u923172145
python
p02660
import math 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==[]:...
import math 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==[]:...
[ "misc.opposites", "assignment.value.change", "identifier.change" ]
384,983
384,984
u470618774
python
p02660
import collections N = int(input()) A = list() if N == 1: A.append(1) else: while N%2 == 0: A.append(2) N = N//2 f = 3 while f*f <= N: if N % f == 0: A.append(f) N = N//f else: f += 2 if N != 1: A.append(N) A = collections.Counter(A) del A[1] count = 0 for a in A.values(): n = 1 th = n*(n+...
import collections N = int(input()) A = list() if N == 1: A.append(1) else: while N%2 == 0: A.append(2) N = N//2 f = 3 while f*f <= N: if N % f == 0: A.append(f) N = N//f else: f += 2 if N != 1: A.append(N) A = collections.Counter(A) del A[1] count = 0 for a in A.values(): n = 1 th = n*(n+...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
384,985
384,986
u009885900
python
p02660
import math from collections import defaultdict N = int(input()) n = N #素因数分解 factor = defaultdict(lambda: 0) tmp = int(math.sqrt(N))+1 for num in range(2,tmp): while N % num == 0: N //= num factor[num] += 1 if not factor: factor[n] += 1 elif N != 1: factor[N] += 1 ans = 0 for num in fa...
import math from collections import defaultdict N = int(input()) n = N #素因数分解 factor = defaultdict(lambda: 0) tmp = int(math.sqrt(N))+1 for num in range(2,tmp): while N % num == 0: N //= num factor[num] += 1 if not factor and n!=1: factor[n] += 1 elif N != 1: factor[N] += 1 ans = 0 for ...
[ "control_flow.branch.if.condition.change" ]
384,987
384,988
u426175055
python
p02660
import sympy def prime_decomposition(n): i = 2 table = [] while i * i <= n: while n % i == 0: n /= i table.append(i) i += 1 if n > 1: table.append(n) return table def main(): N=int(input()) ans=0 if N==1: print(ans) return t=prime_decomposition(N) ...
def prime_decomposition(n): i = 2 table = [] while i * i <= n: while n % i == 0: n /= i table.append(i) i += 1 if n > 1: table.append(n) return table def main(): N=int(input()) ans=0 if N==1: print(ans) return t=prime_decomposition(N) if len(t)==1:...
[]
384,997
384,998
u825378567
python
p02660
# coding: utf-8 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,...
# coding: utf-8 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,...
[ "control_flow.break.add" ]
385,001
385,002
u681444474
python
p02660
import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = coll...
import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = coll...
[ "call.remove" ]
385,003
385,004
u489762173
python
p02660
import math 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==[...
import math 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==[...
[ "call.remove" ]
385,011
385,012
u593346450
python
p02660
import bisect 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, ...
import bisect 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, ...
[ "call.remove" ]
385,015
385,016
u797572808
python
p02660
import numpy as np from functools import * import sys sys.setrecursionlimit(100000) input = sys.stdin.readline import numpy as np def acinput(): return list(map(int, input().split(" "))) def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent while b * b <= n: while n ...
import numpy as np from functools import * import sys sys.setrecursionlimit(100000) input = sys.stdin.readline import numpy as np def acinput(): return list(map(int, input().split(" "))) def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent while b * b <= n: while n ...
[ "call.remove" ]
385,029
385,030
u346308892
python
p02660
import numpy as np from functools import * import sys sys.setrecursionlimit(100000) input = sys.stdin.readline import numpy as np def acinput(): return list(map(int, input().split(" "))) def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent while b * b <= n: while n ...
import numpy as np from functools import * import sys sys.setrecursionlimit(100000) input = sys.stdin.readline import numpy as np def acinput(): return list(map(int, input().split(" "))) def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent while b * b <= n: while n ...
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change", "call.add" ]
385,031
385,030
u346308892
python
p02660
n = int(input()); a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) b = len(a); if n == 1: count = 0; else: count = 1; x = 1; y = 1; for i in range(1,b): ...
# 取得 nn = int(input()); n = nn; a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) b = len(a); #操作回数 if nn == 1: count = 0; else: count = 1; x = 1; y = 1; for i in...
[ "assignment.variable.change", "identifier.change", "control_flow.branch.if.condition.change" ]
385,036
385,037
u158380546
python
p02660
n=int(input()) ans=0 p=2 while p<=10**6 and n!=1: dv=0 wa=1 num=1 while n%p==0: n/=p n=int(n) dv+=1 if dv>0: while dv>=wa: num+=1 wa+=num num-=1 ans+=num p+=1 if n!=1: print("1") exit() print(str(ans))
n=int(input()) ans=0 p=2 while p<=10**6 and n!=1: dv=0 wa=1 num=1 while n%p==0: n/=p n=int(n) dv+=1 if dv>0: while dv>=wa: num+=1 wa+=num num-=1 ans+=num p+=1 if n!=1: print(str(ans+1)) exit() print(str(ans))
[ "call.arguments.change", "io.output.change", "call.arguments.add" ]
385,040
385,041
u478918022
python
p02660
def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a import sys inp = int(input()) x=prime_factoriz...
def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a import sys inp = int(input()) x=prime_factoriz...
[ "literal.number.integer.change", "assignment.value.change", "expression.operator.compare.change", "control_flow.loop.condition.change" ]
385,044
385,045
u246907970
python
p02660
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_divisors[::-1] def prime_len(n): a = ...
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_divisors[::-1] def prime_len(n): a = ...
[ "call.remove" ]
385,052
385,053
u171255092
python
p02660
def divisor(n): i = 1 table = [] while i * i <= n: if n%i == 0: table.append(i) table.append(n//i) i += 1 table = list(set(table)) return table def prime_decomposition(n): i = 2 table = [] while i * i <= n: while n % i == 0: n //= i tabl...
def divisor(n): i = 1 table = [] while i * i <= n: if n%i == 0: table.append(i) table.append(n//i) i += 1 table = list(set(table)) return table def prime_decomposition(n): i = 2 table = [] while i * i <= n: while n % i == 0: n //= i tabl...
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.add", "call.arguments.change" ]
385,058
385,059
u506086925
python
p02660
#import math N = int(input()) 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: fct.append((n, 1)) ...
N = int(input()) 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: fct.append((n, 1)) return fct ...
[ "control_flow.break.remove" ]
385,063
385,064
u760794812
python
p02660
import sys, io, os, re import bisect from pprint import pprint from math import sin, cos, pi, radians, sqrt, floor from copy import copy, deepcopy from collections import deque from math import gcd from functools import reduce def array1(n): return [0] * n def array2(n, m): return [[0] * m for x in range(n)] def array...
import sys, io, os, re import bisect from pprint import pprint from math import sin, cos, pi, radians, sqrt, floor from copy import copy, deepcopy from collections import deque from math import gcd from functools import reduce def array1(n): return [0] * n def array2(n, m): return [[0] * m for x in range(n)] def array...
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
385,067
385,068
u181412342
python
p02660
a=int(input()) ans =0 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]) ...
a=int(input()) ans =0 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]) ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
385,089
385,090
u559250296
python
p02660
import bisect ans = 0 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(...
import bisect ans = 0 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(...
[ "assignment.value.change", "identifier.change", "control_flow.loop.for.condition.change" ]
385,094
385,095
u728615412
python
p02660
import bisect ans = 0 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(...
import bisect ans = 0 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(...
[ "assignment.value.change", "identifier.change", "control_flow.loop.for.condition.change", "control_flow.branch.if.condition.change" ]
385,096
385,095
u728615412
python
p02660
N = int(input()) ANS = 0 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]) ...
N = int(input()) ANS = 0 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]) ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
385,110
385,111
u556657484
python
p02660
N = int(input()) ANS = 0 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]) ...
N = int(input()) ANS = 0 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]) ...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
385,112
385,111
u556657484
python
p02660
N = int(input()) def prime_factorize(n): ans = 0 while n % 2 == 0: i = 1 j = 0 while n % 2 == 0: n = n//2 j += 1 if i <= j: ans += 1 i += 1 j = 0 f = 3 while f * f <= N: i = 1 j = ...
N = int(input()) def prime_factorize(n): ans = 0 while n % 2 == 0: i = 1 j = 0 while n % 2 == 0: n = n//2 j += 1 if i <= j: ans += 1 i += 1 j = 0 f = 3 while f * f <= n: i = 1 j = ...
[ "identifier.change", "control_flow.loop.condition.change" ]
385,115
385,116
u173072656
python
p02660
from collections import defaultdict import math def soi(num_ref): arr = [] num = num_ref for i in range(2, int(math.sqrt(num))+1): if num%i == 0: cnt = 0 while num%i == 0: cnt += 1 num //= i arr.append([i, cnt]) if num != 1: ...
from collections import defaultdict import math def soi(num_ref): arr = [] num = num_ref for i in range(2, int(math.sqrt(num))+1): if num%i == 0: cnt = 0 while num%i == 0: cnt += 1 num //= i arr.append([i, cnt]) if num != 1: ...
[ "call.arguments.change" ]
385,123
385,124
u840773955
python
p02660
import collections n=int(input()) ans=0 d=1 m=0 def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a...
import collections n=int(input()) ans=0 d=1 m=0 def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a...
[ "call.remove" ]
385,133
385,134
u726284577
python
p02660
import math N=int(input()) ans=0 arr=[] tmp=1 #print(int(math.sqrt(N))+5) for i in range(int(math.sqrt(N))+5): tmp=1 while N % ((i+2)**tmp) == 0: N=N / ((i+2)**tmp) #print((i+2)**tmp) ans+=1 tmp+=1 while N % (i+2) == 0: N = N // (i+2) if N > 1 : ans+1 pri...
import math N=int(input()) ans=0 arr=[] tmp=1 #print(int(math.sqrt(N))+5) for i in range(int(math.sqrt(N))+5): tmp=1 while N % ((i+2)**tmp) == 0: N=N / ((i+2)**tmp) #print((i+2)**tmp) ans+=1 tmp+=1 while N % (i+2) == 0: N = N // (i+2) if N > 1 : ans+=1 pr...
[ "assignment.compound.arithmetic.replace.add", "expression.operator.arithmetic.replace.remove", "expression.operation.binary.change" ]
385,156
385,157
u112114596
python
p02660
# coding: utf-8 import sys import math from collections import Counter import itertools import fractions from decimal import * #import numpy as np #from functools import reduce # 入力を整数に変換して受け取る def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) # 入力全てを整数に変換したものの配列を受け取る ...
# coding: utf-8 import sys import math from collections import Counter import itertools import fractions from decimal import * #import numpy as np #from functools import reduce # 入力を整数に変換して受け取る def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) # 入力全てを整数に変換したものの配列を受け取る ...
[ "identifier.replace.add", "literal.replace.remove" ]
385,188
385,189
u832871520
python
p02660
n = int(input()) t = [] for i in range(2,int(-(-n**0.5//1))+1): if(n%i == 0): cmp = 0 while(n%i == 0): cmp += 1 n //= i t.append([i,cmp]) if(n == 1): break if(n != 1): z = 1 z = -len(t) for i in range(len(t)): j = 1 while(t[i][1] >= 0): ...
n = int(input()) t = [] for i in range(2,int(-(-n**0.5//1))+1): if(n%i == 0): cmp = 0 while(n%i == 0): cmp += 1 n //= i t.append([i,cmp]) if(n == 1): break if(n != 1): z = 1 else: z = 0 z -= len(t) for i in range(len(t)): j = 1 while(t[i][1...
[ "assignment.value.change" ]
385,202
385,203
u289036437
python
p02660
import math def factorization(n): r = [] temp = n for i in range(2,int(math.sqrt(n))+1): m = 0 while temp % i == 0: temp /= i m += 1 if m > 0: r.append((i,m)) if temp != 1: r.append((temp,1)) if len(r) == 0: r.append((n,1))...
import math def factorization(n): r = [] temp = n for i in range(2,int(math.sqrt(n))+1): m = 0 while temp % i == 0: temp /= i m += 1 if m > 0: r.append((i,m)) if temp != 1: r.append((temp,1)) if len(r) == 0: r.append((n,1))...
[ "control_flow.loop.for.condition.change" ]
385,207
385,208
u060752882
python
p02660
import math def check(n): count = 0 end = int(math.sqrt(n)+1) for i in range(2,end): if n%i==0: count += 1 n/=i if n%i==0: l = 2 count2 = 0 while n%i==0: n/=i count2+=1 if count2==l: ...
import math def check(n): count = 0 end = int(math.sqrt(n)+1) for i in range(2,end): if n%i==0: count += 1 n/=i if n%i==0: l = 2 count2 = 0 while n%i==0: n/=i count2+=1 if count2==l: ...
[ "expression.operation.binary.add" ]
385,240
385,241
u734195782
python
p02660
N=int(input()) C=[0]*(10**6+1) n=[i for i in range(50)] n[0]=1 for i in range(40): n[i+1]+=(n[i]+1) for i in range(2,int(N**0.5)+1): if N%i==0: while N%i==0: C[i]+=1 N//=i res=0 for c in C: if c>0: for i in range(50): if c<n[i]: res+=i ...
N=int(input()) C=[0]*(10**6+1) n=[i for i in range(50)] n[0]=1 for i in range(40): n[i+1]+=(n[i]+1) for i in range(2,int(N**0.5)+1): if N%i==0: while N%i==0: C[i]+=1 N//=i res=0 for c in C: if c>0: for i in range(50): if c<n[i]: res+=i ...
[ "expression.operation.binary.add" ]
385,242
385,243
u294721290
python
p02660
N=int(input()) C=[] n=[i for i in range(50)] n[0]=1 for i in range(49): n[i+1]+=(n[i]+1) for i in range(2,int(N**0.5)+1): if N%i==0: while N%i==0: C.append(i) N//=i D=set(C) E=[] for d in D: E.append(C.count(d)) res=0 for e in E: for i in range(50): if n[i]<=e...
N=int(input()) C=[] n=[i for i in range(50)] n[0]=1 for i in range(49): n[i+1]+=(n[i]+1) for i in range(2,int(N**0.5)+1): if N%i==0: while N%i==0: C.append(i) N//=i D=set(C) E=[] for d in D: E.append(C.count(d)) res=0 for e in E: for i in range(50): if n[i]<=e...
[ "expression.operation.binary.add" ]
385,244
385,245
u294721290
python
p02660
class Sieve: def __init__(self, n=1): self.f = [0 for _ in range(n+1)] self.f[0] = -1 self.f[1] = -1 self.primes = [] for i in range(2, n+1): if self.f[i]: continue self.primes.append(i) self.f[i] = i for j...
class Sieve: def __init__(self, n=1): self.f = [0 for _ in range(n+1)] self.f[0] = -1 self.f[1] = -1 self.primes = [] for i in range(2, n+1): if self.f[i]: continue self.primes.append(i) self.f[i] = i for j...
[]
385,257
385,258
u419877586
python
p02660
#!/usr/bin/env python3 from sympy import factorint def parse(n): # n -> largest m s.t. m(m+1)/2 <= n m = 1 while m * (m + 1) <= 2 * n: m += 1 return m - 1 def factorint(n): fct = [] b, e = 2, 0 while b * b <= n: while n % b == 0: n = n // b e = e ...
#!/usr/bin/env python3 def parse(n): # n -> largest m s.t. m(m+1)/2 <= n m = 1 while m * (m + 1) <= 2 * n: m += 1 return m - 1 def factorint(n): fct = [] b, e = 2, 0 while b * b <= n: while n % b == 0: n = n // b e = e + 1 if e > 0: ...
[]
385,263
385,264
u329232967
python
p02660
import math from sys import exit n=int(input()) primes = {} i = 2 ans = 0 square = math.floor(math.sqrt(n)) if n == 1: print(0) exit() # while True: # if n == 1 or i > square: # break # if n % i == 0: # if i not in primes.keys(): # primes[i] = 1 # else: # ...
import math from sys import exit n=int(input()) primes = {} i = 2 ans = 0 square = math.floor(math.sqrt(n)) if n == 1: print(0) exit() # while True: # if n == 1 or i > square: # break # if n % i == 0: # if i not in primes.keys(): # primes[i] = 1 # else: # ...
[ "call.remove" ]
385,270
385,271
u806779442
python
p02660
# -*- coding: utf-8 -*- import collections # factrize def factorize(target_number): factor_list = [] while target_number % 2 == 0: factor_list.append(2) n //= 2 factor = 3 while factor * factor <= target_number: while target_number % factor == 0: target_number //= fac...
# -*- coding: utf-8 -*- import collections # factrize def factorize(target_number): factor_list = [] while target_number % 2 == 0: factor_list.append(2) target_number //= 2 factor = 3 while factor * factor <= target_number: while target_number % factor == 0: target_nu...
[ "identifier.change" ]
385,272
385,273
u811817592
python
p02660
# -*- coding: utf-8 -*- import collections # factrize def factorize(target_number): factor = 2 factor_list = [] while factor * factor <= target_number: while target_number % factor == 0: target_number //= factor factor_list.append(factor) factor = factor + 2 if ta...
# -*- coding: utf-8 -*- import collections # factrize def factorize(target_number): factor = 2 factor_list = [] while factor * factor <= target_number: while target_number % factor == 0: target_number //= factor factor_list.append(factor) factor += 1 if target_num...
[ "assignment.remove" ]
385,274
385,275
u811817592
python
p02660
import numpy as np #from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson #from scipy.sparse import csr_matrix import itertools import copy n = int(input()) def seachPrimeNum(N): max = int(np.sqrt(N)) seachList = [i for i in range(2,N+1)] primeNum = [] while s...
import numpy as np #from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson #from scipy.sparse import csr_matrix import itertools import copy n = int(input()) def seachPrimeNum(N): max = int(np.sqrt(N)) seachList = [i for i in range(2,N+1)] primeNum = [] while s...
[]
385,282
385,283
u300579805
python
p02660
def prime_factorize(n): a = [] cnt = 0 while n % 2 == 0: cnt += 1 n //= 2 if cnt > 0: a.append(cnt) f = 3 cnt = 0 while f * f <= n: if n % f == 0: cnt += 1 n //= f else: f += 2 if cnt > 0: ...
def prime_factorize(n): a = [] N = n cnt = 0 while n % 2 == 0: cnt += 1 n //= 2 if cnt > 0: a.append(cnt) f = 3 cnt = 0 while f * f <= N: if n % f == 0: cnt += 1 n //= f else: f += 2 if cnt > 0: ...
[ "identifier.change", "control_flow.loop.condition.change" ]
385,284
385,285
u361381049
python
p02660
import collections as cl #素因数分解 N = int(input()) res = 0 def prime(N): l = [] p = 2 while N % 2 == 0: l.append(p) N //= p p += 1 while p * p <= N: if N % p == 0: l.append(p) N //= p else: p += 2 if N != 1: l.append(N) ...
import collections as cl #素因数分解 N = int(input()) res = 0 def prime(N): l = [] p = 2 while N % 2 == 0: l.append(p) N //= p p += 1 while p * p <= N: if N % p == 0: l.append(p) N //= p else: p += 2 if N != 1: l.append(N) ...
[ "identifier.replace.add", "literal.replace.remove" ]
385,286
385,287
u008718882
python
p02660
from collections import Counter N = 2 def prime(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = Counter(prim...
from collections import Counter N = int(input()) def prime(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = C...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.add" ]
385,291
385,292
u686036872
python
p02660
from collections import Counter N = int(input()) def prime(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = C...
from collections import Counter N = int(input()) def prime(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = C...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
385,293
385,292
u686036872
python
p02660
# 素因数分解 # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_A&lang=ja import math from collections import Counter n = int(input()) origin = n ans = [] i = 2 while i <= math.sqrt(n): if n % i == 0: n //= i ans.append(str(i)) else: i += 1 if n != 1: ans.append(str(n)) #...
# 素因数分解 # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_A&lang=ja import math from collections import Counter n = int(input()) origin = n ans = [] i = 2 while i <= math.sqrt(n): if n % i == 0: n //= i ans.append(str(i)) else: i += 1 if n != 1: ans.append(str(n)) #...
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
385,300
385,301
u285022453
python
p02660
# 素因数分解 # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_A&lang=ja import math from collections import Counter n = int(input()) origin = n ans = [] i = 2 while i <= math.sqrt(n): if n % i == 0: n //= i ans.append(str(i)) else: i += 1 if n != 1: ans.append(str(n)) #...
# 素因数分解 # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_A&lang=ja import math from collections import Counter n = int(input()) origin = n ans = [] i = 2 while i <= math.sqrt(n): if n % i == 0: n //= i ans.append(str(i)) else: i += 1 if n != 1: ans.append(str(n)) #...
[ "control_flow.break.add" ]
385,302
385,301
u285022453
python
p02660
# 素因数分解 # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_A&lang=ja import math from collections import Counter n = int(input()) origin = n ans = [] i = 2 while i <= math.sqrt(n): if n % i == 0: n //= i ans.append(str(i)) else: i += 1 if n != 1: ans.append(str(n)) #...
# 素因数分解 # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_A&lang=ja import math from collections import Counter n = int(input()) origin = n ans = [] i = 2 while i <= math.sqrt(n): if n % i == 0: n //= i ans.append(str(i)) else: i += 1 if n != 1: ans.append(str(n)) #...
[ "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
385,303
385,301
u285022453
python
p02660
#4問目 N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a def has_duplicates2(seq...
#4問目 N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a def has_duplicates2(seq...
[ "call.remove" ]
385,310
385,311
u694649864
python
p02660
from functools import lru_cache def PrimeFactorization(m): pf = {} i = 2 while i ** 2 < n: while n % i == 0: pf[i] = pf.get(i, 0) + 1 n //= i i += 1 if n > 1: pf[n] = 1 return pf @lru_cache(maxsize=100000) def f(x): return int((-1 + (1 + 8 * x)...
from functools import lru_cache def PrimeFactorization(n): pf = {} i = 2 while i ** 2 < n: while n % i == 0: pf[i] = pf.get(i, 0) + 1 n //= i i += 1 if n > 1: pf[n] = 1 return pf @lru_cache(maxsize=100000) def f(x): return int((-1 + (1 + 8 * x)...
[ "identifier.change" ]
385,323
385,324
u762540523
python
p02660
import sys #2以上の整数nに対して素因数分解 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.ap...
import sys #2以上の整数nに対して素因数分解 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.ap...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
385,333
385,334
u601271366
python
p02660
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==[...
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==[...
[ "call.remove" ]
385,354
385,355
u464205401
python
p02660
from collections import defaultdict n = int(input()) dd = defaultdict(int) for i in range(2, int(n ** (1 / 3) + 2)): while n % i == 0: dd[i] += 1 n //= i if n != 1: dd[n] += 1 ans = 0 cnt = {} for i in range(20): tmp = i * (i + 1) // 2 cnt[tmp] = i for i, j in dd.items(): for num in...
from collections import defaultdict n = int(input()) dd = defaultdict(int) for i in range(2, int(n ** (1 / 2) + 2)): while n % i == 0: dd[i] += 1 n //= i if n != 1: dd[n] += 1 ans = 0 cnt = {} for i in range(20): tmp = i * (i + 1) // 2 cnt[tmp] = i for i, j in dd.items(): for num in...
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change" ]
385,367
385,368
u745514010
python
p02660
from collections import defaultdict D = defaultdict(int) N = int(input()) a = 2 while a * a <= N: if N % a: a += 1 else: N //= a D[a] += 1 D[N] += 1 ans = 0 for k,v in D.items(): i = 0 while i*(i+1) <= v * 2: i += 1 ans += i-1 print(ans)
from collections import defaultdict D = defaultdict(int) N = int(input()) a = 2 while a * a <= N: if N % a: a += 1 else: N //= a D[a] += 1 if N != 1: D[N] += 1 ans = 0 for k,v in D.items(): i = 0 while i*(i+1) <= v * 2: i += 1 ans += i-1 print(ans)
[ "control_flow.branch.if.add" ]
385,373
385,374
u278886389
python
p02660
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy sys.setrecursionlimit(10**7) inf=10**20 mod=10**9+7 dd=[(-1,0),(0,1),(1,0),(0,-1)] ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys...
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy sys.setrecursionlimit(10**7) inf=10**20 mod=10**9+7 dd=[(-1,0),(0,1),(1,0),(0,-1)] ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys...
[]
385,381
385,382
u941753895
python
p02660
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy sys.setrecursionlimit(10**7) inf=10**20 mod=10**9+7 dd=[(-1,0),(0,1),(1,0),(0,-1)] ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys...
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy sys.setrecursionlimit(10**7) inf=10**20 mod=10**9+7 dd=[(-1,0),(0,1),(1,0),(0,-1)] ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys...
[]
385,383
385,382
u941753895
python
p02660
# n = int(input()) n = 16 if n == 1: print(0) exit() 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!=...
n = int(input()) if n == 1: print(0) exit() 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: ...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.add" ]
385,386
385,387
u768896740
python
p02660
from collections import Counter n = int(input()) def prime_factorize(n): # Return list of prime factorized result # O(sqrt(n)) a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: ...
from collections import Counter n = int(input()) def prime_factorize(n): # Return list of prime factorized result # O(sqrt(n)) a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: ...
[ "identifier.replace.add", "literal.replace.remove" ]
385,392
385,393
u652057333
python
p02660
n = int(input()) p = 2 ans = 0 while n > 1: if p > 10 ** 6: ans = 1 break e = 1 while n % (p ** e) == 0: n = n // (p ** e) e += 1 ans += 1 while n % p == 0: n = n // p p += 1 print(ans)
n = int(input()) p = 2 ans = 0 while n > 1: if p > 10 ** 6: ans += 1 break e = 1 while n % (p ** e) == 0: n = n // (p ** e) e += 1 ans += 1 while n % p == 0: n = n // p p += 1 print(ans)
[ "assignment.value.change" ]
385,394
385,395
u023540496
python
p02660
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]) return ar...
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]) return ar...
[ "assignment.variable.change", "identifier.change", "identifier.replace.add", "literal.replace.remove" ]
385,396
385,397
u380524497
python
p02660
import collections import bisect n = 10 ** 4 fl = [1] * n fl[0] = 0 fl[1] = 0 lprime = [] for i in range(n): if fl[i] == 1: lprime.append(i) ti = i * 2 while ti < n: fl[ti] = 0 ti += i def prime_factorize(n): global lprime a = [] for p in lprime: ...
import collections import bisect n = 10 ** 6 + 10 fl = [1] * n fl[0] = 0 fl[1] = 0 lprime = [] for i in range(n): if fl[i] == 1: lprime.append(i) ti = i * 2 while ti < n: fl[ti] = 0 ti += i def prime_factorize(n): global lprime a = [] for p in lprime: ...
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
385,398
385,399
u672220554
python
p02660
# -*- coding: utf-8 -*- # map(int, input().split()) import math N = int(input()) if N == 1: print(0) exit() 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 ...
# -*- coding: utf-8 -*- # map(int, input().split()) import math N = int(input()) if N == 1: print(0) exit() 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 ...
[ "call.remove" ]
385,402
385,403
u693025087
python
p02660
import math l = [] n = int(input()) for i in range(2,int(math.sqrt(n))+1): flg = 0 while n % i == 0: if flg == 0: l.append(1) flg = 1 else: l[-1] += 1 n = n//i if l == [] and n != 1: l.append(1) ans = 0 for i in range(len(l)): c = 1 while l[i] - c >= 0: l[i] -= c c += 1...
import math l = [] n = int(input()) for i in range(2,int(math.sqrt(n))+1): flg = 0 while n % i == 0: if flg == 0: l.append(1) flg = 1 else: l[-1] += 1 n = n//i if n != 1: l.append(1) ans = 0 for i in range(len(l)): c = 1 while l[i] - c >= 0: l[i] -= c c += 1 ans += ...
[]
385,426
385,427
u636489589
python
p02660
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...
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...
[ "call.remove" ]
385,438
385,439
u457901067
python
p02660
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==[]: arr...
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==[]: arr...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
385,453
385,454
u561083515
python
p02660
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==[]: arr...
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==[]: arr...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
385,471
385,472
u556610039
python
p02660
def factorization(n): #素因数分解のプログラム([素因数,指数]のリストのリストで出力→24→[[2, 3], [3, 1]]) 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: ...
def factorization(n): #素因数分解のプログラム([素因数,指数]のリストのリストで出力→24→[[2, 3], [3, 1]]) 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: ...
[ "call.remove", "call.arguments.change" ]
385,479
385,480
u247830763
python
p02660
import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a def judg...
import collections N = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a def judg...
[ "identifier.change", "expression.operation.binary.change" ]
385,483
385,484
u805392425
python
p02660
def f(i,n): ans =0 cnt = i while n%cnt == 0: n//=cnt cnt*=i ans +=1 while n%i ==0: n//=i return n,ans n = int(input()) nn = n i = 2 ans = 0 while i <= int(n**0.5)+1: if n%i ==0: n,a = f(i,n) ans += a i += 1 if n == nn: ans += 1 print(ans)
def f(i,n): ans =0 cnt = i while n%cnt == 0: n//=cnt cnt*=i ans +=1 while n%i ==0: n//=i return n,ans n = int(input()) i = 2 ans = 0 while i <= int(n**0.5)+1: if n%i ==0: n,a = f(i,n) ans += a i += 1 if n >1: ans += 1 print(ans)
[ "assignment.remove" ]
385,489
385,490
u115110170
python
p02660
n=int(input()) if n==1: print(0) def sosuu(n): if n == 1: return False for i in range(2,int(n**0.5)+1): if n % i == 0: return False return True if sosuu(n): print(1) exit() def factorization(n): arr = [] temp = n for i in range(2, int(-(-n**0.5//1))+1): ...
n=int(input()) if n==1: print(0) exit() def sosuu(n): if n == 1: return False for i in range(2,int(n**0.5)+1): if n % i == 0: return False return True if sosuu(n): print(1) exit() def factorization(n): arr = [] temp = n for i in range(2, int(-(-n**0.5/...
[ "call.add" ]
385,507
385,508
u636502712
python
p02660
def main(): n = int(input()) if n == 1: print(0) return def eratos(n): flag = [True] * (n + 1) for i in range(2, int(n**0.5) + 1): if flag[i]: for j in range(2*i, n + 1, i): flag[j] = False return [i for i, x in enumerat...
def main(): n = int(input()) if n == 1: print(0) return def eratos(n): flag = [True] * (n + 1) for i in range(2, int(n**0.5) + 1): if flag[i]: for j in range(2*i, n + 1, i): flag[j] = False return [i for i, x in enumerat...
[ "control_flow.break.remove", "control_flow.return.add" ]
385,509
385,510
u060736237
python
p02660
def main(): n = int(input()) if n == 1: print(0) return def eratos(n): flag = [True] * (n + 1) for i in range(2, int(n**0.5) + 1): if flag[i]: for j in range(2*i, n + 1, i): flag[j] = False return [i for i, x in enumerat...
def main(): n = int(input()) if n == 1: print(0) return def eratos(n): flag = [True] * (n + 1) for i in range(2, int(n**0.5) + 1): if flag[i]: for j in range(2*i, n + 1, i): flag[j] = False return [i for i, x in enumerat...
[ "call.arguments.change", "control_flow.return.add" ]
385,511
385,510
u060736237
python
p02660
import sys #import numpy as np import math #from fractions import Fraction #import itertools #from collections import deque #import heapq #from fractions import gcd input=sys.stdin.readline n=int(input()) def factorize(n): fct={} temp=n if temp<4: fct[temp]=1 else: e=0 while tem...
import sys #import numpy as np import math #from fractions import Fraction #import itertools #from collections import deque #import heapq #from fractions import gcd input=sys.stdin.readline n=int(input()) def factorize(n): fct={} temp=n if temp<4: fct[temp]=1 else: e=0 while tem...
[ "call.add" ]
385,522
385,523
u064434060
python
p02660
n=int(input()) def prime_factorize(n): a=[] while n%2==0: a.append(2) n//=2 f=3 while f**2<=n: if n%f==0: a.append(f) n//=f else: f+=2 if n!=1: a.append(n) return(a) import collections A=collections.Counter(prime_factori...
n=int(input()) def prime_factorize(n): a=[] while n%2==0: a.append(2) n//=2 f=3 while f**2<=n: if n%f==0: a.append(f) n//=f else: f+=2 if n!=1: a.append(n) return(a) import collections A=collections.Counter(prime_factori...
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "control_flow.loop.for.condition.change" ]
385,529
385,530
u116233709
python
p02660
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 ar...
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 ar...
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
385,545
385,546
u945228737
python
p02660
n = int(input()) if n == 1: print(0) exit() tmp = n ans = 0 for i in range(2, int(-(-n**0.5//1)+1)): if tmp % i == 0: cnt = 0 while tmp % i == 0: cnt += 1 tmp //= i i_cnt = int((cnt*2)**0.5//1) if i_cnt * (i_cnt+1) //2 <= cnt and (i_cnt+1) * (i_cnt+1...
n = int(input()) if n == 1: print(0) exit() tmp = n ans = 0 for i in range(2, int(-(-n**0.5//1)+1)): if tmp % i == 0: cnt = 0 while tmp % i == 0: cnt += 1 tmp //= i i_cnt = int((cnt*2)**0.5//1) if i_cnt * (i_cnt+1) //2 <= cnt and (i_cnt+1) * (i_cnt+2...
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
385,585
385,586
u542190960
python
p02660
import math def read_int(): return int(input().strip()) def read_ints(): return list(map(int, input().strip().split(' '))) def solve(): N = read_int() if N == 1: return 0 max_divisor = math.sqrt(N) divisor = 2 counter = 0 while divisor <= max_divisor: temp_divisor =...
import math def read_int(): return int(input().strip()) def read_ints(): return list(map(int, input().strip().split(' '))) def solve(): N = read_int() if N == 1: return 0 max_divisor = math.sqrt(N) divisor = 2 counter = 0 while divisor <= max_divisor: temp_divisor =...
[ "function.return_value.change" ]
385,589
385,590
u309716323
python
p02660
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==[]: arr...
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==[]: arr...
[ "call.arguments.change" ]
385,593
385,594
u446601167
python
p02660
import numpy as np import collections n = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) ...
import numpy as np import collections n = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) ...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
385,597
385,598
u324197506
python
p02660
from bisect import bisect_right import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number)...
from bisect import bisect_right import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number)...
[ "control_flow.branch.if.condition.change" ]
385,605
385,606
u353797797
python
p02660
import collections n = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = collec...
import collections n = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = collec...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
385,616
385,617
u563838154
python
p02660
import collections n = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = collec...
import collections n = int(input()) def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a c = collec...
[ "expression.operation.binary.remove", "control_flow.loop.for.condition.change" ]
385,618
385,617
u563838154
python
p02660
n=int(input()) def prime_factorize(n): d=defaultdict(int) while n % 2 == 0: d[2]+=1 n //= 2 f = 3 while f * f <= n: if n % f == 0: d[f]+=1 n //= f else: f += 2 if n != 1: d[n]+=1 return d u=prime_factorize(n) cnt=0 f...
from collections import defaultdict n=int(input()) def prime_factorize(n): d=defaultdict(int) while n % 2 == 0: d[2]+=1 n //= 2 f = 3 while f * f <= n: if n % f == 0: d[f]+=1 n //= f else: f += 2 if n != 1: d[n]+=1 r...
[]
385,621
385,622
u106778233
python
p02660
def factorization(n): if(n == 1): return [] 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...
def factorization(n): if(n == 1): return [] 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...
[ "call.add" ]
385,623
385,624
u727330770
python
p02661
N = int(input()) array1 = [] array2 = [] for i in range(N): a,b = map(int,input().split()) array1.append(a) array2.append(b) array1.sort() array2.sort() if N % 2 == 0: min = array1[N//2]+array1[N//2+1] max = array2[N//2]+array2[N//2+1] print(max-min+1) else: min = array1[N//2] max = ar...
N = int(input()) array1 = [] array2 = [] for i in range(N): a,b = map(int,input().split()) array1.append(a) array2.append(b) array1.sort() array2.sort() if N % 2 == 0: min = array1[N//2]+array1[N//2-1] max = array2[N//2]+array2[N//2-1] print(max-min+1) else: min = array1[N//2] max = ar...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
385,650
385,651
u367794409
python
p02661
# ABC169 E N=int(input()) AB=[tuple(map(int,input().split())) for _ in [0]*N] def med(A): N=len(A) if N%2: return A[(N+1)//2-1] else: return (A[N//2-1]+A[N//2])//2 A=[i[0] for i in AB] B=[i[1] for i in AB] medA=med(sorted(A)) medB=med(sorted(B)) if N%2: print(medB-medA+1) else:...
# ABC169 E N=int(input()) AB=[tuple(map(int,input().split())) for _ in [0]*N] def med(A): N=len(A) if N%2: return A[(N+1)//2-1] else: return (A[N//2-1]+A[N//2])/2 A=[i[0] for i in AB] B=[i[1] for i in AB] medA=med(sorted(A)) medB=med(sorted(B)) if N%2: print(medB-medA+1) else: ...
[ "expression.operator.arithmetic.change", "function.return_value.change", "expression.operation.binary.change", "call.add", "call.arguments.change" ]
385,656
385,657
u842170774
python
p02661
N = int(input()) As = [] Bs = [] for _ in range(N): a,b = map(int,input().split()) As.append(a) Bs.append(b) As.sort() Bs.sort() if N%2 == 1: ma = As[N//2] mb = Bs[N//2] print(mb-ma+1) else: ma = (As[N//2-1] + As[N//2])//2 mb = (Bs[N//2-1] + Bs[N//2])//2 print(int((mb-ma)*2)+1)
N = int(input()) As = [] Bs = [] for _ in range(N): a,b = map(int,input().split()) As.append(a) Bs.append(b) As.sort() Bs.sort() if N%2 == 1: ma = As[N//2] mb = Bs[N//2] print(mb-ma+1) else: ma = (As[N//2-1] + As[N//2])/2 mb = (Bs[N//2-1] + Bs[N//2])/2 print(int((mb-ma)*2)+1)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
385,658
385,659
u625046108
python
p02661
import sys input_methods=['clipboard','file','key'] using_method=0 input_method=input_methods[using_method] tin=lambda : map(int, input().split()) lin=lambda : list(IN()) mod=1000000007 #+++++ def is_median(k, xl, is_odd): over = 0 under = 0 inner = 0 same = 0 for a,b in xl: if b < k: under+=1 elif k<a:...
import sys input_methods=['clipboard','file','key'] using_method=0 input_method=input_methods[using_method] tin=lambda : map(int, input().split()) lin=lambda : list(IN()) mod=1000000007 #+++++ def is_median(k, xl, is_odd): over = 0 under = 0 inner = 0 same = 0 for a,b in xl: if b < k: under+=1 elif k<a:...
[ "expression.operation.binary.remove" ]
385,664
385,665
u505830998
python
p02661
N = int(input()) left = [] right = [] for _ in range(N): l, r = map(int, input().split()) left.append(l) right.append(r) left.sort() right.sort() if N%2==0: for i, (l, r) in enumerate(zip(left, right), 1): if i==N//2: L = l R = r if i==N//2+1: R +=r ...
N = int(input()) left = [] right = [] for _ in range(N): l, r = map(int, input().split()) left.append(l) right.append(r) left.sort() right.sort() if N%2==0: for i, (l, r) in enumerate(zip(left, right), 1): if i==N//2: L = l R = r if i==N//2+1: R +=r ...
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change", "expression.operation.binary.remove" ]
385,698
385,699
u054514819
python
p02661
def main(N, lines): a = sorted(map(lambda line: line[0], lines)) b = sorted(map(lambda line: line[1], lines)) if N % 2 == 1: mi = a[N // 2] ma = b[N // 2] print(int(ma - mi + 1)) else: mi = (a[N // 2 - 1] + a[N // 2]) / 2 ma = (b[N // 2 - 1] + b[N // 2]) / 2 ...
def main(N, lines): a = sorted(map(lambda line: line[0], lines)) b = sorted(map(lambda line: line[1], lines)) if N % 2 == 1: mi = a[N // 2] ma = b[N // 2] print(int(ma - mi + 1)) else: mi = (a[N // 2 - 1] + a[N // 2]) ma = (b[N // 2 - 1] + b[N // 2]) prin...
[ "expression.operation.binary.remove" ]
385,707
385,708
u744054041
python
p02661
N = int(input()) A = list() B = list() for i in range(N): a, b = map(int, input().split()) A.append(a) B.append(b) A.sort() B.sort() if(N%2==1): x = A[(N-1)//2] y = B[(N-1)//2] print(y-x+1) else: x = A[(N//2)+1] + A[N//2] y = B[(N//2)+1] + B[N//2] print(y-x+1)
N = int(input()) A = list() B = list() for i in range(N): a, b = map(int, input().split()) A.append(a) B.append(b) A.sort() B.sort() if(N%2==1): x = A[(N-1)//2] y = B[(N-1)//2] print(y-x+1) else: x = A[(N//2)-1] + A[N//2] y = B[(N//2)-1] + B[N//2] print(y-x+1)
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
385,731
385,732
u114920558
python
p02661
import statistics N = int(input()) A = [] B = [] for i in range(N): a, b = map(int, input().split()) A.append(a) B.append(b) Am = statistics.median(A) Bm = statistics.median(B) if N % 2 == 0: print(round(2 * Bm - Am) + 1) else: print(Bm - Am + 1)
import statistics N = int(input()) A = [] B = [] for i in range(N): a, b = list(map(int, input().split())) A.append(a) B.append(b) Am = statistics.median(A) Bm = statistics.median(B) if N % 2 == 0: print(round(2 * (Bm - Am) + 1)) else: print(Bm - Am + 1)
[ "call.add", "call.arguments.change" ]
385,737
385,738
u434609232
python
p02661
import statistics N = int(input()) A = [] B = [] for i in range(N): a, b = list(map(int, input().split())) A.append(a) B.append(b) Am = statistics.median(A) Bm = statistics.median(B) if N % 2 == 0: print(2 * round(Bm - Am) + 1) else: print(Bm - Am + 1)
import statistics N = int(input()) A = [] B = [] for i in range(N): a, b = list(map(int, input().split())) A.append(a) B.append(b) Am = statistics.median(A) Bm = statistics.median(B) if N % 2 == 0: print(round(2 * (Bm - Am) + 1)) else: print(Bm - Am + 1)
[ "call.arguments.add", "call.arguments.change" ]
385,739
385,738
u434609232
python
p02661
from statistics import* (n,),*t=[map(int,t.split())for t in open(0)] a,b=map(median,zip(*t)) print(int(b-a)*(2-n%2)+1)
from statistics import* (n,),*t=[map(int,t.split())for t in open(0)] a,b=map(median,zip(*t)) print(int((b-a)*(2-n%2))+1)
[ "call.arguments.change" ]
385,773
385,774
u729133443
python