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
p02731
l = int(input()) result = (l/3)**3
l = int(input()) a = (l/3)**3 print(a)
[ "assignment.variable.change", "identifier.change", "call.add" ]
509,297
509,298
u797796416
python
p02731
L = int(input()) k = L//3 print(k**3)
L = int(input()) k = L/3 print(k**3)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
509,304
509,305
u641446860
python
p02731
import decimal decimal.getcontext().prec = 6 L = int(input()) l = decimal.Decimal(L/3) print(l**3)
import decimal decimal.getcontext().prec = 12 L = int(input()) l = decimal.Decimal(L/3) print(l**3)
[ "literal.number.integer.change", "assignment.value.change" ]
509,332
509,333
u306497037
python
p02731
L=input() print((L/3)**3)
L=int(input()) print((L/3)**3)
[ "call.add", "call.arguments.change" ]
509,334
509,335
u471539833
python
p02731
a = float(input()) print(pow(a/9, 3))
a = float(input()) print(pow(a/3, 3))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,336
509,337
u215334265
python
p02731
l = int(input()) mxv = float(l/3 ** 3) print(mxv)
l = int(input()) mxv = float((l/3) ** 3) print(mxv)
[ "call.arguments.change" ]
509,338
509,339
u985949234
python
p02731
l = int(input()) mxv = l/3 ** 3 print(mxv)
l = int(input()) mxv = float((l/3) ** 3) print(mxv)
[ "call.add", "call.arguments.change" ]
509,340
509,339
u985949234
python
p02731
L = int(input()) print(L*L*L/9)
L = int(input()) print(L*L*L/27)
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,341
509,342
u266964556
python
p02731
print((input() / 3.0)**3)
print((float(input()) / 3.0)**3)
[ "call.add", "call.arguments.change" ]
509,360
509,361
u981273776
python
p02731
n = input() print(n*n*n/27)
n = int(input()) print(n*n*n/27)
[ "call.add", "call.arguments.change" ]
509,375
509,376
u340494803
python
p02731
# -*- coding: utf-8 -*- # 入力 L = input() print((L/3)**3)
# -*- coding: utf-8 -*- # 入力 L = int(input()) print((L/3)**3)
[ "call.add", "call.arguments.change" ]
509,377
509,378
u458834822
python
p02731
l = float(input()) print((l/3)^3)
l = float(input()) print((l/3)**3)
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,389
509,390
u478646901
python
p02731
L = int(input()) print(L//3 ** 3)
L = int(input()) print((L/3 )** 3)
[ "call.arguments.change", "expression.operator.arithmetic.change", "expression.operation.binary.change", "io.output.change" ]
509,393
509,394
u600896094
python
p02731
L = int(input()) print(L/3 ** 3)
L = int(input()) print((L/3 )** 3)
[ "call.arguments.change" ]
509,395
509,394
u600896094
python
p02731
L = int(input()) print(float(L)/3)
L = int(input()) print((float(L)/3)**3)
[ "call.arguments.change", "call.arguments.add" ]
509,398
509,399
u179443195
python
p02731
L = input(input()) print(pow(L/3,3))
L = int(input()) print(pow(L/3,3))
[ "assignment.value.change", "identifier.change", "call.function.change" ]
509,421
509,422
u942233555
python
p02731
L = input() print(pow(L/3,3))
L = int(input()) print(pow(L/3,3))
[ "call.add", "call.arguments.change" ]
509,423
509,422
u942233555
python
p02731
a = int(input()) print(a **3 )
a = int(input()) print((a/3)**3)
[ "call.arguments.change" ]
509,426
509,427
u225056745
python
p02731
l = int(intput()) e = l / 3.0 print(e*e*e)
l = int(input()) e = l / 3 print(e*e*e)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change", "expression.operation.binary.change" ]
509,431
509,432
u682965461
python
p02731
l = float(intput()) e = l / 3.0 print(e*e*e)
l = int(input()) e = l / 3 print(e*e*e)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change", "expression.operation.binary.change" ]
509,433
509,432
u682965461
python
p02731
l = float(intput()) e = l // 3.0 print(e*e*e)
l = int(input()) e = l / 3 print(e*e*e)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
509,434
509,432
u682965461
python
p02731
l = input() volume = l/3**3 print(volume)
l = int(input()) volume = (l/3)**3 print(volume)
[ "call.add", "call.arguments.change" ]
509,437
509,438
u493318999
python
p02731
import sys import os import collections def main(): if os.getenv("LOCAL"): sys.stdin = open("input.txt", "r") L = int(sys.stdin.buffer.readline().decode().rstrip()) print(L ** 3 // 27) if __name__ == '__main__': main()
import sys import os import collections def main(): if os.getenv("LOCAL"): sys.stdin = open("input.txt", "r") L = int(sys.stdin.buffer.readline().decode().rstrip()) print(L ** 3 / 27) if __name__ == '__main__': main()
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,458
509,459
u634079249
python
p02731
print(int(input()) ** 3 // 27)
print(int(input()) ** 3 / 27)
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,528
509,529
u373047809
python
p02731
l = int(input()) res = (l//3)**3 print(res)
l = int(input()) res = (l/3)**3 print(res)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
509,554
509,555
u979126665
python
p02731
l = int(input()) d = l/3 print(d^3)
l = int(input()) d = l/3 print(d**3)
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,561
509,562
u778623968
python
p02731
a=input() b=a/3 print(b**3) exit()
a = int(input()) b=a/3 print(b**3) exit()
[ "call.add", "call.arguments.change" ]
509,607
509,608
u614724425
python
p02731
a=input() b=a/3 print(b**3) exit(0)
a = int(input()) b=a/3 print(b**3) exit()
[ "call.add", "call.arguments.change" ]
509,609
509,608
u614724425
python
p02731
a = int(input()) b = a // 3 print('{:.12f}'.format(b ** 3))
a = int(input()) b = a / 3 print('{:.12f}'.format(b ** 3))
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
509,614
509,615
u067694718
python
p02731
L = input() LL = L / 3 print(LL ** 3)
L = input() LL = float(L) / 3 print(LL ** 3)
[ "call.add", "call.arguments.change" ]
509,624
509,625
u676359467
python
p02731
n = input() num = int(n) num = num//3 num = num**3 print(num)
n = input() num = float(n) num = num/3 num = num**3 print(num)
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
509,628
509,629
u471221431
python
p02731
l = int(input()) L = l//3 print(L ** 3)
l = int(input()) L = l/3 print(L ** 3)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
509,644
509,645
u037901699
python
p02731
L = int(input()) hen_nagasa = L / 3 print(int(hen_nagasa ** 3))
L = int(input()) hen_nagasa = L / 3 print(hen_nagasa ** 3)
[ "call.arguments.change" ]
509,646
509,647
u651314218
python
p02731
L = str(input()) HWL = L/3 print(HWL ** 3)
L = int(input()) HWL = L/3 print(HWL ** 3)
[ "assignment.value.change", "identifier.change", "call.function.change" ]
509,664
509,665
u460009487
python
p02731
L = 999 HWL = L/3 print(HWL ** 3)
L = int(input()) HWL = L/3 print(HWL ** 3)
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.add" ]
509,666
509,665
u460009487
python
p02731
L=int(input()) x=round(L/3,3) print(round(x*x*x,7))
L=int(input()) x=L/3 print(round(x*x*x,7))
[ "call.remove", "call.arguments.change" ]
509,696
509,697
u554784585
python
p02731
l = int(input()) i = l // 3 print(float(i**3))
l = int(input()) i = l / 3 print(i**3)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "call.arguments.change" ]
509,746
509,747
u998082063
python
p02731
L = input() l = L / 3 print(l ** 3)
L = int(input()) l = L / 3 print(l ** 3)
[ "call.add", "call.arguments.change" ]
509,795
509,796
u455809703
python
p02731
L= int(input()) A = (L/3)*(L/3)*(L/3) print (int(A))
L= int(input()) A = (L/3)*(L/3)*(L/3) print(A)
[ "call.arguments.change" ]
509,807
509,808
u604055101
python
p02731
##C L = int(input()) (L/3)**3
##C L = int(input()) print((L/3)**3)
[ "call.add", "call.arguments.change" ]
509,858
509,859
u799978560
python
p02731
l=float(input()) print(l/3**3)
l=float(input()) print((l/3)**3)
[ "call.arguments.change" ]
509,860
509,861
u740047492
python
p02731
l=int(input()) print(l/3**3)
l=float(input()) print((l/3)**3)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
509,862
509,861
u740047492
python
p02731
L=input() print (L**3/27)
L=int(input()) print (L**3/27)
[ "call.add", "call.arguments.change" ]
509,866
509,867
u685684561
python
p02731
def maxvolume(s): length = int(s / 3) s -= length breadth = s / 2 height = s - breadth return "{:.12f}".format(length * breadth * height) s = int(input()) print(maxvolume(s))
def maxvolume(s): length = s / 3 s -= length breadth = s / 2 height = s - breadth return "{:.12f}".format(length * breadth * height) s = int(input()) print(maxvolume(s))
[ "call.remove", "call.arguments.change" ]
509,895
509,896
u693134887
python
p02731
L = input() ans = (L//3)**3 print(ans)
L = int(input()) ans = (L/3)**3 print(ans)
[ "call.add", "call.arguments.change", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
509,928
509,929
u302435631
python
p02731
n=int(input()) m=n/3 o=o**3 print(o)
n=int(input()) m=n/3 o=m**3 print(o)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
509,935
509,936
u631579948
python
p02731
#!/usr/bin/env python3 import collections import itertools as it import math import numpy as np # A = input() A = int(input()) # A = map(int, input().split()) # A = list(map(int, input().split())) # A = [int(input()) for i in range(N)] # # c = collections.Counter() print(A//3 * A//3 * (A-(A//3)*2))
#!/usr/bin/env python3 import collections import itertools as it import math import numpy as np # A = input() A = int(input()) # A = map(int, input().split()) # A = list(map(int, input().split())) # A = [int(input()) for i in range(N)] # # c = collections.Counter() print(A/3 * A/3 * (A-(A/3)*2))
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,942
509,943
u671446913
python
p02731
l = int(input()) a = l//3 b = (l-a)//2 c = l-(a+b) print (a*b*c)
l = int(input()) a = l/3 b = (l-a)/2 c = l-(a+b) print (a*b*c)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
509,944
509,945
u422272120
python
p02731
n = int(input()) l = n/3 print(l*3)
n = int(input()) l = n/3 print(l**3)
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
509,946
509,947
u832459318
python
p02731
import decimal getcontext().prec = 20 S = decimal.Decimal(input()) s = S/3 print(decimal.Decimal(s**3))
import decimal decimal.getcontext().prec = 20 S = decimal.Decimal(input()) s = S/3 print(decimal.Decimal(s**3))
[]
509,980
509,981
u933193704
python
p02731
import math import itertools import statistics #n, m = list(map(int, input().split())) L = int(input()) x = L//3 ans = (x*x*(L-x*2)) print(float(ans))
import math import itertools import statistics #n, m = list(map(int, input().split())) L = int(input()) x = L/3 ans = (x*x*(L-x*2)) #y = L/3 #a = (y*y*y) #print(ans) print(ans)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "call.remove", "call.arguments.change" ]
509,987
509,988
u696444274
python
p02731
# Python3 code to Maximize volume of # cuboid with given sum of sides # Return the maximum volume. def maxvolume( s ): # finding length length = int(s / 3) s -= length # finding breadth breadth = s / 2 # finding height height = s - breadth return int(length * breadth * height) # Driven Pr...
# Python3 code to Maximize volume of # cuboid with given sum of sides # Return the maximum volume. def maxvolume( s ): # finding length length = (s / 3) s -= length # finding breadth breadth = s / 2 # finding height height = s - breadth return (length * breadth * height) # Driven Program ...
[]
510,011
510,012
u973840289
python
p02731
s = int(input()) a = s//3 b = (s-a)//2 print(a*b*(s-a-b))
s = int(input()) a = s/3 b = (s-a)/2 print(a*b*(s-a-b))
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
510,077
510,078
u548492494
python
p02731
L = int(input()) x = int(L/3) print(x**3)
L = int(input()) x = float(L/3) print(x**3)
[ "assignment.value.change", "identifier.change", "call.function.change" ]
510,090
510,091
u676933207
python
p02731
L = input() x = int(L/3) print(x**3)
L = int(input()) x = float(L/3) print(x**3)
[ "call.add", "call.arguments.change", "assignment.value.change", "identifier.change", "call.function.change" ]
510,092
510,091
u676933207
python
p02731
l = int(input()) x = l/3 x = p**3 print(x)
l = int(input()) p = l/3 p = p**3 print(p)
[ "assignment.variable.change", "identifier.change", "call.arguments.change", "io.output.change" ]
510,097
510,098
u888458413
python
p02731
L = float(input()) N = (L//3)**3 print(N)
L = int(input()) N = (L/3)**3 print(N)
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
510,116
510,117
u765758367
python
p02731
s = int(input()) l = int(s / 3) s -= l b = s / 2 h = s - b print(l * b * h)
s = int(input()) l = s / 3 s -= l b = s / 2 h = s - b print(l * b * h)
[ "call.remove", "call.arguments.change" ]
510,122
510,123
u550835660
python
p02731
l = int(input()) print(pow(l/3, 2))
l = int(input()) print(pow(l/3, 3))
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
510,128
510,129
u020812754
python
p02731
cl = input() l = int(l) print(l **3 / 27)
l = input() l = int(l) print(l **3 / 27)
[ "assignment.variable.change", "identifier.change" ]
510,132
510,133
u670961163
python
p02731
L = int(input()) ans = L**3//27 print('{:.10f}'.format(ans))
L = int(input()) ans = L**3/27 print('{:.8f}'.format(ans))
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
510,137
510,138
u018597853
python
p02731
L = int(input()) if L ==1: ans = 1 else: ans = (L/3)**3 print(ans)
L = int(input()) if L ==3: ans = 1 else: ans = (L/3)**3 print(ans)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
510,141
510,142
u559250296
python
p02731
#C L = int(input()) a = L/3 b = L/3 c = L/3 print(str(round(round(a, 3)*round(b, 3)*round(c, 3),16)))
#C L = int(input()) a = L/3 b = L/3 c = L/3 print(str(round(round(a, 7)*round(b, 7)*round(c, 7),10)))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change" ]
510,171
510,172
u477351099
python
p02731
#C L = int(input()) a = L/3 b = L/3 c = L/3 print(str(round(round(a, 3)*round(b, 3)*round(c, 3),7)))
#C L = int(input()) a = L/3 b = L/3 c = L/3 print(str(round(round(a, 7)*round(b, 7)*round(c, 7),10)))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change" ]
510,173
510,172
u477351099
python
p02731
l = int(input()) print(int((l / 3)*(l / 3)*(l / 3)))
l = int(input()) print((l / 3)*(l / 3)*(l / 3))
[ "call.arguments.change" ]
510,190
510,191
u752115287
python
p02731
n = int(input()) N = n//3 print(N*N*N)
n = int(input()) N = n/3 print(N*N*N)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
510,194
510,195
u811068179
python
p02731
L = int(input()) print(L**3 / 9)
L = int(input()) print(L**3 / 27)
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,201
510,202
u692054751
python
p02731
# C - Maximum Volume L = int(input()) a = L/3 ans = a**3
# C - Maximum Volume L = int(input()) a = L/3 ans = a**3 print(ans)
[ "call.add" ]
510,212
510,213
u994034374
python
p02731
L=int(input())/10 print(L**3//0.0027)
L=int(input()) print(L**3/27)
[ "expression.operation.binary.remove" ]
510,244
510,245
u435788772
python
p02731
L=int(input()) print(L**3//27)
L=int(input()) print(L**3/27)
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,246
510,245
u435788772
python
p02731
L = int(input()) print(L**3/3)
L = int(input()) print(L**3/27)
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,261
510,262
u847758719
python
p02731
L = int(input()) ans = 0 L1 = L//3 L -= L1 L2 = L//2 L -= L2 print(L1*L2*L)
L = int(input()) ans = 0 L1 = L/3 L -= L1 L2 = L/2 L -= L2 print(L1*L2*L)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
510,298
510,299
u663438907
python
p02731
n=input() print((n/3)**3)
n=int(input()) print((n/3)**3)
[ "call.add", "call.arguments.change" ]
510,312
510,313
u623283955
python
p02731
L = int(input()) print((l/3)**(3))
L = int(input()) print((L/3)**(3))
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,314
510,315
u796708718
python
p02731
s = int(input()) l = s//3 s-=l b = s//2 h = s-b print(l*b*h)
s = int(input()) l = s/3 s-=l b = s/2 h = s-b print(l*b*h)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
510,318
510,319
u638801031
python
p02731
# ANSHUL GAUTAM # IIIT-D from math import * from copy import * from string import * # alpha = ascii_lowercase from random import * # l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference from bisect import * # bisect_left(arr,x,start,end) => start and end parameters are temporary from sys imp...
# ANSHUL GAUTAM # IIIT-D from math import * from copy import * from string import * # alpha = ascii_lowercase from random import * # l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference from bisect import * # bisect_left(arr,x,start,end) => start and end parameters are temporary from sys imp...
[ "call.remove", "call.arguments.change" ]
510,353
510,354
u056977516
python
p02731
l=input() print((l/3)^3)
l=float(input()) print((l/3)**3)
[ "call.add", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,363
510,364
u566264434
python
p02731
n=int(input()) print(int(n/3)**3)
n=int(input()) print((n/3)**3)
[ "call.arguments.change" ]
510,383
510,384
u998077480
python
p02731
from sys import stdin def main(): readline=stdin.readline L=int(readline()) print((L//3)**3) if __name__=="__main__": main()
from sys import stdin def main(): readline=stdin.readline L=int(readline()) print((L/3)**3) if __name__=="__main__": main()
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,389
510,390
u079022693
python
p02731
l=int(input()) a=l//3 b=l-a*2 print(a*a*b)
l=int(input()) a=l/3 b=l-a*2 print(a*a*b)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
510,412
510,413
u234582237
python
p02731
n = int(input()) if n % 3 == 0: print((n//3)**3) else: a = n//3 b = n//3 c = n - a - b print(a * b * c)
n = int(input()) if n % 3 == 0: print((n//3)**3) else: a = n/3 b = n/3 c = n - a - b print(a * b * c)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
510,416
510,417
u549579601
python
p02731
l = int(input()) print((l // 3) ** 3)
l = int(input()) print((l / 3) ** 3)
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,420
510,421
u123525541
python
p02731
import sys rl = sys.stdin.readline def solve(): L = int(input()) print((L // 3) ** 3) if __name__ == '__main__': solve()
import sys rl = sys.stdin.readline def solve(): L = int(input()) print((L / 3) ** 3) if __name__ == '__main__': solve()
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,422
510,423
u935984175
python
p02731
def main(): L = float(input()) ans = L**3 // 27 print(ans) if __name__ == '__main__': main()
def main(): L = int(input()) ans = L**3 / 27 print(ans) if __name__ == '__main__': main()
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
510,432
510,433
u185034753
python
p02731
print(((input())/3)**3)
print(((int(input()))/3)**3)
[ "call.add", "call.arguments.change" ]
510,451
510,452
u777394984
python
p02731
n = int(input()) print(pow(n, 3)//27)
n = float(input()) print(pow(n, 3)/27)
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
510,473
510,474
u021548497
python
p02731
L = map(int,input().split()) print((L/3)**3)
L = (int(input())) print((L/3)**3)
[ "assignment.value.change", "call.arguments.change", "call.remove" ]
510,513
510,514
u221149873
python
p02732
import collections N = int(input()) A = list(map(int, input().split())) c = collections.Counter(A) ans = 0 for i in range(N): ans+=c[i]*(c[i]-1)//2 for i in range(N): print(ans-(c[A[i]]-1))
import collections N = int(input()) A = list(map(int, input().split())) c = collections.Counter(A) ans = 0 for i in c: ans+=c[i]*(c[i]-1)//2 for i in range(N): print(ans-(c[A[i]]-1))
[ "control_flow.loop.range.bounds.upper.change", "call.arguments.change" ]
510,515
510,516
u742729271
python
p02732
def resolve(): n = int(input()) a = tuple(map(int,input().split())) A = collections.Counter(a) cnt_0 = 0 for i in A.values(): cnt_0 += int(i*(i-1)/2) for i in a: cnt_1 = A[i]-1 print(cnt_0-cnt_1) resolve()
import collections def resolve(): n = int(input()) a = tuple(map(int,input().split())) A = collections.Counter(a) cnt_0 = 0 for i in A.values(): cnt_0 += int(i*(i-1)/2) for i in a: cnt_1 = A[i]-1 print(cnt_0-cnt_1) resolve()
[]
510,535
510,536
u405733072
python
p02732
n=(int)(nput()) a=input().split() for i in range(n): a[i]=(int)(a[i]) dic={} sum=0 for i in range(n): if not a[i] in dic: dic[a[i]]=1 else: dic[a[i]]+=1 sum+=dic[a[i]]-1 for i in a: print(sum-dic[i]+1)
n=(int)(input()) a=input().split() for i in range(n): a[i]=(int)(a[i]) dic={} sum=0 for i in range(n): if not a[i] in dic: dic[a[i]]=1 else: dic[a[i]]+=1 sum+=dic[a[i]]-1 for i in a: print(sum-dic[i]+1)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
510,542
510,543
u729790965
python
p02732
""" スニペット """ def get_int(): return int(input()) def get_ints(): return list(map(int, input().split())) """ スニペット """ import math # 2つ選ぶ通り数を算出 nC2 def choose2(n): return n*(n-1)//2 # インプット N = get_int() An = get_ints() """ 全ての要素から2つのボールを選ぶ通り数を求める """ uni = [0] * (N+1) # ユニーク数の配列を求める for i in range(N): uni[An...
""" スニペット """ def get_int(): return int(input()) def get_ints(): return list(map(int, input().split())) """ スニペット """ import math # 2つ選ぶ通り数を算出 nC2 def choose2(n): return n*(n-1)//2 # インプット N = get_int() An = get_ints() """ 全ての要素から2つのボールを選ぶ通り数を求める """ uni = [0] * (N+1) # ユニーク数の配列を求める for i in range(N): uni[An...
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
510,555
510,556
u977661421
python
p02732
n = int(input()) a =list(map(int,input().split())) d = [0]*(n+1) answer = 0 for i in range(n): d[a[i]]+=1 for j in range(n): answer+= (d[j]*(d[j]-1))//2 for k in range(n): print(answer+1-(d[a[k]]))
n = int(input()) a =list(map(int,input().split())) d = [0]*(n+1) answer = 0 for i in range(n): d[a[i]]+=1 for j in range(n+1): answer+= (d[j]*(d[j]-1))//2 for k in range(n): print(answer+1-(d[a[k]]))
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
510,575
510,576
u696684809
python
p02732
n = int(input()) a =list(map(int,input().split())) d = [0]*(n+1) answer = 0 for i in range(n): d[a[i]]+=1 for j in range(n): answer+= int((d[j]*(d[j]-1))/2) for k in range(n): print(answer+1-(d[a[k]]))
n = int(input()) a =list(map(int,input().split())) d = [0]*(n+1) answer = 0 for i in range(n): d[a[i]]+=1 for j in range(n+1): answer+= (d[j]*(d[j]-1))//2 for k in range(n): print(answer+1-(d[a[k]]))
[ "call.remove", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
510,578
510,576
u696684809
python
p02732
N=int(input()) s=0 A=list(map(int,input().split())) li=[0]*(2*(10**5)+1) for i in range(N): li[A[i]]+=1 for j in range(N): s+=li[j]*(li[j]-1)//2 for k in range(N): print(s-li[A[k]]+1)
N=int(input()) s=0 A=list(map(int,input().split())) li=[0]*(2*(10**5)+1) for i in range(N): li[A[i]]+=1 for j in range(N+1): s+=li[j]*(li[j]-1)//2 for k in range(N): print(s-li[A[k]]+1)
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
510,583
510,584
u554784585
python
p02732
n=int(input()) arr=list(map(int,input().split())) tt=[0]*(n+7) total=0 for a in range(n): tt[a]+=1 for t in tt: total += (t*(t-1)//2) for i in range(n): n = tt[arr[0]] d = (n*(n-1)//2) - ((n-1)*(n-2)//2) print(total-d) # x * x-1 // 2
n=int(input()) arr=list(map(int,input().split())) tt=[0]*(n+7) total=0 for a in arr: tt[a]+=1 for t in tt: total += (t*(t-1)//2) for i in range(n): n = tt[arr[i]] d = (n*(n-1)//2) - ((n-1)*(n-2)//2) print(total-d) # x * x-1 // 2
[ "control_flow.loop.range.bounds.upper.change", "call.arguments.change", "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change" ]
510,592
510,593
u697696097
python
p02732
n = int(input()) *li,=map(int, input().split()) from collections import Counter c = Counter() for i in li: c[i] += 1 ans=0 from math import comb for i in c.values(): ans += comb(i, 2) for i in li: print(ans - comb(c[i], 2) + comb(c[i-1], 2))
n = int(input()) *li,=map(int, input().split()) from collections import Counter c = Counter() for i in li: c[i] += 1 ans=0 from math import comb for i in c.values(): ans += comb(i, 2) for i in li: print(ans - comb(c[i], 2) + comb(c[i]-1, 2))
[ "call.arguments.change" ]
510,603
510,604
u236885379
python
p02728
#!/usr/bin/env python3 import sys from functools import lru_cache from collections import deque sys.setrecursionlimit(10**8) INF = float("inf") MOD = 1000000007 # type: int class Graph(object): def __init__(self, N): self.N = N self.E = defaultdict(list) def add_edge(self, src, dest, w=1)...
#!/usr/bin/env python3 import sys from collections import defaultdict from functools import lru_cache from collections import deque sys.setrecursionlimit(10**8) INF = float("inf") MOD = 1000000007 # type: int class Graph(object): def __init__(self, N): self.N = N self.E = defaultdict(list) ...
[]
510,619
510,620
u947883560
python
p02728
import sys input = sys.stdin.readline from collections import deque nn = 200200 mod = 10**9+7 fa = [1] * (nn+1) fainv = [1] * (nn+1) inv = [1] * (nn+1) for i in range(nn): fa[i+1] = fa[i] * (i+1) % mod fainv[-1] = pow(fa[-1], mod-2, mod) for i in range(nn)[::-1]: fainv[i] = fainv[i+1] * (i+1) % mod for i in r...
import sys input = sys.stdin.readline from collections import deque nn = 200200 mod = 10**9+7 fa = [1] * (nn+1) fainv = [1] * (nn+1) inv = [1] * (nn+1) for i in range(nn): fa[i+1] = fa[i] * (i+1) % mod fainv[-1] = pow(fa[-1], mod-2, mod) for i in range(nn)[::-1]: fainv[i] = fainv[i+1] * (i+1) % mod for i in r...
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "expression.operation.unary.add", "control_flow.loop.range.bounds.step.change", "assignment.value.change" ]
510,629
510,630
u864197622
python
p02728
# coding: utf-8 import sys sr = lambda: sys.stdin.readline().rstrip() ir = lambda: int(sr()) lr = lambda: list(map(int, sr().split())) # 全方位木DP、葉側と根側 N = ir() graph = [[] for _ in range(N+1)] # 1-indexed for _ in range(N-1): a, b = lr() graph[a].append(b) graph[b].append(a) MOD = 10 ** 9 + 7 fact = [1]...
# coding: utf-8 import sys sr = lambda: sys.stdin.readline().rstrip() ir = lambda: int(sr()) lr = lambda: list(map(int, sr().split())) # 全方位木DP、葉側と根側 N = ir() graph = [[] for _ in range(N+1)] # 1-indexed for _ in range(N-1): a, b = lr() graph[a].append(b) graph[b].append(a) MOD = 10 ** 9 + 7 fact = [1]...
[ "literal.number.integer.change", "variable_access.subscript.index.change" ]
510,636
510,637
u600402037
python
p02728
import sys input = lambda: sys.stdin.readline().rstrip() #MOD P = 10**9 + 7 N = 200001 #使う最大値+1以上にする、値に注意3*10^5とかにしとくと安心 inv = [0] + [1] # 1/x finv = [1] + [1] # 1/x! fac = [1] + [1] # x! for i in range(2, N): inv += [inv[P % i] * (P - int(P / i)) % P] fac += [(fac[i-1] * i) % P] finv += [(finv[i-1] * inv[i]) % ...
import sys input = lambda: sys.stdin.readline().rstrip() #MOD P = 10**9 + 7 N = 200001 #使う最大値+1以上にする、値に注意3*10^5とかにしとくと安心 inv = [0] + [1] # 1/x finv = [1] + [1] # 1/x! fac = [1] + [1] # x! for i in range(2, N): inv += [inv[P % i] * (P - int(P / i)) % P] fac += [(fac[i-1] * i) % P] finv += [(finv[i-1] * inv[i]) % ...
[ "assignment.value.change", "expression.operation.binary.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
510,638
510,639
u816587940
python