Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03457 (python)

Fixed submission:
N = int(input())
points = [list(map(int, input().split(" "))) for _ in range(N)]
points.insert(0, [0, 0, 0])

can = True
for i in range(N):
    dt, dist = 0, 0
    dt = points[i + 1][0] - points[i][0]
    dist = abs(points[i + 1][1] - points[i][1]) + abs(points[i + 1][2] - points[i][2])
    if dt < dist:
        can = False
    if dist % 2 != dt % 2:
        can = False

if can:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
points = [list(map(int, input().split(" "))) for _ in range(point_count)]
points.insert(0, [0, 0, 0])

can = True
for i in range(N):
    dt = points[i + 1][0] - points[i][0]
    dist = abs(x[i + 1][0] - x[i][0]) + abs(y[i + 1][0] - y[i][0])
    if dt < dist:
        can = False
    if dist % 2 != dt % 2:
        can =False
if can:
    print("YES")
else:
    print("NO")
Problem p02694 (python)

Fixed submission:
x = int(input())
const_a, count = 100, 0

while const_a < x:
  const_a += const_a//100
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
x = int(input())
const_a, count = 100, 0

while const_a < x:
  a += a//100
  count += 1
print(count)
Problem p02713 (python)

Fixed submission:
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)
K = int(input())
t = 0
t1 = 0
t2 = 0
for i in range(1,K+1):
    for j in range(i,K+1):
        for l in range(j,K+1):
            if i == j == l:
                t = t + i
            elif i == j or j ==l or l ==i:
                t = t + 3 * gcd(i, j,l)
            else:
                t = t + 6 * gcd(i,j,l)
             
           
           
print(t)

Buggy submission (verdict: Runtime Error):
import math
K = int(input())
t = 0
for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            t += gcd(gcd(i,j),k)
print(t)

Buggy submission (verdict: Runtime Error):
 def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
K = int(input())
t = 0
t1 = 0
for i in range(1,K+1):
    for j in range(1,K+1):
        for l in range(1,K+1):
            t1 = gcd(i,j)
            t = t + gcd(t1,l)
print(t)
Problem p02742 (python)

Fixed submission:
H,W = map(int,input().split()) 
import math
if (H == 1) or (W == 1):
    print(1)
else:
    if H%2 ==0:
        print(H//2*W)
    else:
        if W%2 == 0:
            print(H*(W//2))
        else:
            print(H*((W-1)//2)+(H+1)//2)

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split()) 
if H%2 ==0:
    print(H//2*W)
else:
    if W%2 == 0:
        print((H//2+(H+1)//2)*(W//2)
    else:
        print((H//2+(H+1)//2)*(W//2)+(H+1)//2)
Problem p02843 (python)

Fixed submission:
N = int(input())
N1 = N%100//5
N2 = 0
if N%100%5 == 0:
    N2 = 0
else:
    N2 = 1
S =N1+N2
if 100*S > N:
    print("0")
else:
    print("1")

Buggy submission (verdict: Runtime Error):
N = int(input())
N1 = N%100//5
N2 == 0
if N%100%5 == 0:
    N2 = 0
else:
    N2 = 1
S =N1+N2
if 100*S > N:
    print(0)
else:
    print(1)
Problem p03721 (python)

Fixed submission:
N, M = map(int,input().split()) 
P = [list(map(int,input().split())) for i in range(N)]
P.sort()
a = 0
for i in range(N):
    if M <= P[i][1]:
        break
    M = M-P[i][1]
    a += 1


print(P[a][0])

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split()) 
P = [list(map(int,input().split())) for i in range(N)]
P1 = P.sort()
a = 0
for i in range(N):
    if M < P[i][1]:
        break
    M = M-P[i][1]
    a += 1

print(P[a][0])
Problem p02854 (python)

Fixed submission:
import numpy as np
N=int(input())
A=list(map(int, input().split()))
A=np.array(A)
left=0 
right=N-1
while left<right:
  mid=(left+right)//2
  if A[:mid+1].sum()<A[mid+1:].sum():
    left=mid+1
  else:
    right=mid
if (abs(A[:left+1].sum()-A[left+1:].sum()))>(abs(A[:left].sum()-A[left:].sum())):
  print((abs(A[:left].sum()-A[left:].sum())))
else:
  print((abs(A[:left+1].sum()-A[left+1:].sum())))

Buggy submission (verdict: Runtime Error):
import numpy as np
N=int(input())
A=list(map(int, input().split()))
A=np.array(A)
left=0 
right=N-1
while left<right:
  ans=0
  mid=(left+right)//2
  if A[:mid+1].sum()<A[mid+1:].sum():
    ans=min(ans,abs(A[:mid+1].sum()<A[mid+1:]))
    left=mid+1
  else:
    right=mid
print(abs(ans))

Buggy submission (verdict: Runtime Error):
import numpy as np
N=int(input())
A=list(map(int, input().split()))
A=np.array(A)
left=0 
right=N-1
while left<right:
  ans=0
  mid=(left+right)//2
  if A[:mid+1].sum()<A[mid+1:].sum():
    ans=min(ans,A[:mid+1].sum()<A[mid+1:])
    left=mid+1
  else:
    right=mid
print(ans)
Problem p02882 (python)

Fixed submission:
import math
a, b, x = map(int, input().split())
h=x/(a**2)
if h<b/2:
    y=2*a*h/b
    shita=math.degrees(math.atan2(b,y))
if h>=b/2:
    y=2*h-b
    t=b-y
    shita=math.degrees(math.atan2(t,a))
print(shita)

Buggy submission (verdict: Runtime Error):
import math
a, b, c = map(int, input().split())
h=x/(a**2)
if h>b/2:
    y=2*a*h/b
    shita=math.degrees(math.atan2(y,b))
if h<=b/2:
    y=2*h-b
    y=b-y
    shita=math.degrees(math.atan2(b,y))
print(shita)

Buggy submission (verdict: Runtime Error):
import math
h=x/(a**2)
if h>b/2:
    y=2*a*h/b
    shita=math.degrees(math.atan2(y,b))
if h<=b/2:
    y=2*h-b
    y=b-y
    shita=math.degrees(math.atan2(b,y))
print(shita)
Problem p02885 (python)

Fixed submission:
a, b=map(int, input().split())
if a-b*2<=0:
  print(0)
else: 
  print(a-b*2)

Buggy submission (verdict: Runtime Error):
n=int(input())
d = list(map(int, input().split()))
a=0
for i in range(0,n,1):
  if d[i]==d[-1]:
     break
  if n==i+1:
     a+=d[i]*d[i+1]
     break
  for j in d[i+1:]:
    a+=d[i]*j
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
d = list(map(int, input().split()))
a=0
for i in range(0,n,1):
  if d[i]==d[-1]:
    break
  if n==i+1:
    a+=d[i]*d[i+1]
    break
  for j in d[i+1:]:
    a+=d[i]*j
print(a)
Problem p02886 (python)

Fixed submission:
n=int(input())
d = list(map(int, input().split()))
a=0
for i in range(0,n,1):
  if i==n:
     break
  for j in d[i+1:]:
    a+=d[i]*j
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
d = list(map(int, input().split()))
a=0
for i in range(0,n,1):
  if d[i]==d[-1]:
    break
  for j in d[i+1:]:
    a+=d[i]*d[j]
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
d = list(map(int, input().split()))
a=0
for i in range(0,len(d),1):
  if d[i]=d[-1]:
    break
  for j in d[i+1]:
    a+=d[i]*d[j]
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
d = list(map(int, input().split()))
a=0
for i in d:
  if d[i]=d[-1]:
    break
  for j in d[i+1:]:
    a+=d[i]*d[j]
print(a)
Problem p02888 (python)

Fixed submission:
from bisect import bisect_left
N=int(input())
L=list(map(int,input().split()))

L.sort()
a=0
for i in range(N-2):
    for j in range(i+1,N-1):
        a+=bisect_left(L,L[i]+L[j])-j-1
print(a)

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
N=int(input())
L=list(map(int,input().split()))

L.sort()
a=0
for i in range(N-2):
    for j in range(i+1,N-1):
        a+=bisect_left(L,L[i]+L[j])-j-1
print(result)

Buggy submission (verdict: Runtime Error):
N=int(input())
L=map(int, input().split())
a=0
for i in range(0,N-2,1):
  for j in range(i+1,N-1,1):
    for q in range(j+1,N,1):
        if L[i]<L[j]+L[q] and L[j]<L[i]+L[q] and L[q]<L[i]+L[j]:
          a+=1
print(a)
Problem p02898 (python)

Fixed submission:
N,K = map(int, input().split())
h = list(map(int, input().split()))
h.sort(reverse=True)
a=0
for i in h:
  if i>=K:
    a+=1
  else:
    break
print(a)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
h = list(map(int, input().split()))
h.sort(reverse=True)
a=0:
for i in h:
  if i>=K:
    a+=1
  else:
    break
print(a)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
h = list(map(int, input().split()))
h.sort(reverse=True)
a=0:
for i in h:
  if i>=h:
    a+=1
  else:
    break
print(a)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
h = list(map(int, input().split()))
h.sort(reverse=True)
a=0:
for i in h:
  if i>=h:
    a+=1
  else:
    break
Problem p02900 (python)

Fixed submission:
import fractions
import math
A,B=map(int, input().split())
n=fractions.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=-1
    lag=-1
    if n % i == 0:
      flag=0
      for j in range(2, int(i**0.5)+1):
        if i%j==0 and i!=j:
          flag=1
          break
      if i != n // i :
        lag=0
        for j in range(2, int((n // i)**0.5)+1):
          if (n // i)%j==0 and i!=j:
            lag=1
            break
    if flag==0:
      divisors.append(i)
    if lag==0:
      divisors.append(n//i)
#flag=0
#print(divisors)
#for j in range(2, int(n**0.5)+1):
#    if n%j==0:
#     flag=1
 #     break
#if flag==0:
 #     divisors.append(n)
print(len(divisors))

Buggy submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
n=math.gcd(A, B)
print(n)

Buggy submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
n=math.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)
      #if i != n // i :
      #  divisors.append(n//i)
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))

Buggy submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)
      #if i != n // i :
      #  divisors.append(n//i)
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))

Buggy submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)
      #if i != n // i :
      #  divisors.append(n//i)
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))

Buggy submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
n=math.gcd(A, B)
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)      
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))
Problem p02909 (python)

Fixed submission:
S=input()
c=['Sunny','Cloudy','Rainy','Sunny']
for i,n in enumerate(c[:3]):
    if S==n:
        print(c[i+1])
        break

Buggy submission (verdict: Runtime Error):
S=input()
c=['Sunny','Cloudy','Rainy','Sunny']
for i,n in enumerate(c[:3]):
  if S==n:
    print(c[i+1])
	break

Buggy submission (verdict: Runtime Error):
S=str(input())
c=['Sunny','Cloudy','Rainy','Sunny']
for i,n in enumerate(c[:3]):
  if S==n:
    print(c[i+1])
	break
Problem p02921 (python)

Fixed submission:
S = input()
T = input()
a=0
for i in range(3):
    if S[i]==T[i]:
        a+=1
print(a)

Buggy submission (verdict: Runtime Error):
S = list(map(int, input().split()))
T = list(map(int, input().split()))
a=0
for i in range(3):
    if S[i]==T[i]:
        a+=1
print(a)

Buggy submission (verdict: Runtime Error):
S = list(map(int, input().split()))
T = list(map(int, input().split()))
a=0
for i in range(3):
  if S[i]==T[i]:
    a+=1
print(a)
Problem p02922 (python)

Fixed submission:
import math
A,B=map(int, input().split())
if A<B:
  k=math.ceil((B-A)/(A-1))+1
  print(k)
elif B==1:
  print(0)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())

C=B//(A-1)
if (B-A)%(A-1)!=0:
    print(C+1)

else:
    print(C)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=B//(A-1)
if B%(A-1)!=0:
    print(C+1)
else:
    print(C)
Problem p03166 (python)

Fixed submission:
import math
import sys
sys.setrecursionlimit(1000000)
dp = [-1]*(100*1000+1)
tab = [[] for x in range(100*1000+1)]

def get_max(root):
    if(dp[root] > -1): return dp[root]
    
    mi = 0
    for nei in tab[root]:
        mi = max(mi,get_max(nei)+1)
    dp[root] = mi
    return dp[root]
def main():
    n,m = map(int,input().split())
    
    for x in range(m):
        a,b = map(int,input().split())
        a-=1;b-=1
        tab[a].append(b)
    
    for x in range(n):
        get_max(x) 
    
    print(max(dp))
main()

Buggy submission (verdict: Runtime Error):
import math

dp = [-1]*(100*1000+1)
tab = [[] for x in range(100*1000+1)]

def get_max(root):
    if(dp[root] > -1): return dp[root]
    
    mi = 0
    for nei in tab[root]:
        mi = max(mi,get_max(nei)+1)
    dp[root] = mi
    return dp[root]
def main():
    n,m = map(int,input().split())
    
    for x in range(m):
        a,b = map(int,input().split())
        a-=1;b-=1
        tab[a].append(b)
    
    for x in range(n):
        get_max(x) 
    
    print(max(dp))
main()
Problem p02717 (python)

Fixed submission:
A,B,C=[int(x) for x in input().split(" ")]
temp=B
B=A
A=C
C=temp
print(A , B , C)

Buggy submission (verdict: Runtime Error):
A,B,C=[int(x) for x in input().split(" ")]
temp=B
B=A
A=C
C=temp
print(A , B , c)
Problem p03635 (python)

Fixed submission:
m,n=map(int,input().split())
print((m-1)*(n-1))

Buggy submission (verdict: Runtime Error):
m,n=int(input().split())
print((m-1)*n)

Buggy submission (verdict: Runtime Error):
m,n=int(input().slide())
print((m-1)*n)

Buggy submission (verdict: Runtime Error):
m,n=input().slide()
x=(m-1)n
print(x)

Buggy submission (verdict: Runtime Error):
n,m=int(input()).slide()
print((m-1)n)
Problem p02702 (python)

Fixed submission:
n = input()
mod = [0]*2019
mod[0] += 1
T = 0
d = 1 # 桁数
for i, s in enumerate(n[::-1]):
  T += int(s) * d
  T %= 2019
  d = (d * 10) % 2019
  mod[T] += 1
  
res = 0  
for m in mod:
  res += m*(m-1)/2
print(int(res))

Buggy submission (verdict: Runtime Error):
n = input()
l = len(n)
mod = [0]*2019
mod[0] += 1
T = 0
d = 1 # 桁数
for i, s in enumerate(Sr):
  T += int(s) * d
  T %= 2019
  d = (d * 10) % 2019
  
res = 0  
for m in mod:
  res += m*(m-1)/2
print(int(res))

Buggy submission (verdict: Runtime Error):
l = len(n)
count = 0
for i in range(l-3):
  x = 0
  for j in range(i+3, l):
    if j == i+3:
      x = int(n[i]) + int(n[i+1]) + int(n[i+2]) + int(n[i+3])
    else:
      x += int(n[j])
    
    if x % 3 != 0:
      continue
    else:
      integer = int(n[i:j+1])
      if integer % 2019 == 0:
        count += 1
print(count)
Problem p02841 (python)

Fixed submission:
data1= list(map(int, input().split()))
data2= list(map(int, input().split()))

if data1[0] != data2[0]:
    print(1)
else:
    print(0)

Buggy submission (verdict: Runtime Error):

M1, D1 = int(input.split())
M2, D2 = int(input.split())

print(M1,M2)

if M1 != M2:
    print(1)
else:
    print(0)
Problem p02921 (python)

Fixed submission:
S = input().split()
T = input().split()
S = list(S[0])
T = list(T[0])

count = 0
for i in range(3):

    if S[i] == T[i]:
        count += 1


print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = N * (N - 1) // 2
print(ans)
Problem p02924 (python)

Fixed submission:
N = int(input())
ans = (N * (N - 1)) // 2
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
pre = list(range(1,N+1))
new = pre[:]
a0 = new[0]
new.remove(a0)
new.append(a0)

val = 0
for i in range(N):
    val += pre[i] % new[i]

print(val)

Buggy submission (verdict: Runtime Error):
N = int(input())
pre = list(range(1,N+1))
new = pre[:] 
new.remove(a0)
new.append(a0)

val = 0
for i in range(N):
    val += pre[i] % new[i]

print(val)
Problem p03110 (python)

Fixed submission:
N = int(input())
li = [list(input().split()) for _ in range(N)]

money = 0
for i in range(N):
    if li[i][1] == 'JPY':
        money += float(li[i][0])
    else:
        money += 380000.0 * float(li[i][0])

print(money)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = [list(input().split()) for _ in range(N)]

money = 0
for i in range(N):
    if li[1] == 'JPY':
        money += float(li[0])
    else:
        money += 380000.0 * float(li[0])

print(money)
Problem p02713 (python)

Fixed submission:
import math
def resolve():
    K = int(input())
    temp = 0
    for i in range(1, K + 1, 1):
        for j in range(1, K + 1, 1):
            for k in range(1, K + 1, 1):
                Result = math.gcd(i, j)
                temp += math.gcd(Result, k)
    print(temp)


resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    K = int(input())
    temp = 0
    for i in range(1, K + 1, 1):
        for j in range(1, K + 1, 1):
            for k in range(1, K + 1, 1):
                Result = fractions.gcd(i, j)
                temp += fractions.gcd(Result, k)
    print(temp)
resolve()
Problem p02717 (python)

Fixed submission:
def resolve():
    a, b, c = map(int, input().split())

    temp_a = a
    temp_b = b
    a = temp_b
    b = temp_a
    temp_c = c
    temp_a = a
    c = temp_a
    a = temp_c
    print(a, b, c)
resolve()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def resolve():
    a, b, c = map(int, list(input()))
    print(a + b + c)


if __name__ == "__main__":
    resolve()
Problem p03369 (python)

Fixed submission:
# -*- coding: utf-8 -*-
text = input()
sum = 700
if text[0] == "o":
    sum += 100
if text[1] == "o":
    sum += 100
if text[2] == "o":
    sum += 100
print(sum)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
text = string(input())
sum = 700
if text[0] == "o":
    sum += 100
if text[1] == "o":
    sum += 100
if text[2] == "o":
    sum += 100
print(sum)
Problem p02694 (python)

Fixed submission:
k=int(input())
start=100
i=0
while True:
    i+=1
    start=start*1.01
    if start>k:
        break
    start=int(start)
print(i)

Buggy submission (verdict: Runtime Error):
1000000000000000000k=int(input())
start=100
i=0
while True:
    i+=1
    start*=1.01
    start=int(start)
    if start>k:
        break
print(i)
Problem p02705 (python)

Fixed submission:
import math
import numpy as np
r=int(input())
print(np.round(math.pi*2*r,6))

Buggy submission (verdict: Runtime Error):
r=int(input())
print(2*r*math.pi)
Problem p02724 (python)

Fixed submission:
n=int(input())
print(1000*(n//500)+5*((n%500)//5))

Buggy submission (verdict: Runtime Error):
n=int(input())
print(1000*(n/500)+((n%500))
Problem p02741 (python)

Fixed submission:
a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k=int(input())
print(a[k-1])

Buggy submission (verdict: Runtime Error):
a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k=int(input())
print(a[k])
Problem p02717 (python)

Fixed submission:
a = list(map(int,input().split()))
a[0], a[1] = a[1], a[0]
a[0], a[2] = a[2], a[0]
 
print(a[0], a[1], a[2])

Buggy submission (verdict: Runtime Error):
n = int(input())
num_list = [list(map(int, input().split())) for i in range(n)]

num_list[1].sort(reverse=True)
v = 1 / (4 * num_list[0][1]) * sum(num_list[1])

c = 1

for i in range(num_list[0][1]):
  if num_list[1][i] < v:
    c = 0
    
if c==1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
a[0], a[1] = a[1], a[0]
a[0], a[2] = a[2], a[0]
 
print(a[0]+" "+a[1]+" "+a[2])

Buggy submission (verdict: Runtime Error):
l = input().split()
 
l[0], l[1] = l[1], 1[0]
l[0], l[2] = l[2], 1[0]
 
print(l[0]+" "+l[1]+" "+l[2])

Buggy submission (verdict: Runtime Error):
l = input().split()

l[0], l[1] = l[1], 1[0]
l[0], l[2] = l[2], 1[0]

print(l)

Buggy submission (verdict: Runtime Error):
from sys import stdin

a = stdin.readline().rstrip()
l = list(map(int, a.split()))

l[0], l[1] = l[1], 1[0]
l[0], l[2] = l[2], 1[0]

print(l)
Problem p02705 (python)

Fixed submission:
import math
r = int(input())
l = math.pi * 2 * r
print(l)

Buggy submission (verdict: Runtime Error):
r = int(input())
l = math.pi * 2 * r
print(l)

Buggy submission (verdict: Runtime Error):
r = int(input())
l = pi * 2 * r
print(l)
Problem p02885 (python)

Fixed submission:
ABInput = str(input())
 
AB = ABInput.split(" ")
 
A = int(AB[0])
B = int(AB[1])
 
TotalCartain = B * 2
 
if TotalCartain > A or TotalCartain == A:
  print (0)
else:
  print (A-TotalCartain)

Buggy submission (verdict: Runtime Error):
N = str(input())
Ds = str(input()).split(" ")
answer = 0
 
for di in range(len(Ds)):
  for dii in range(di):
    sum = Ds[di] + Ds[dii] 
    answer += sum
 
print (answer)

Buggy submission (verdict: Runtime Error):
ABInput = str(input())
 
AB = ABInput.split(" ")
 
A = AB[0]
B = AB[1]
 
TotalCartain = B * 2
 
if TotalCartain > A or TotalCartain == A:
  print (0)
else:
  print (A-TotalCartain)

Buggy submission (verdict: Runtime Error):
ABInput = str(input())
 
AB = ABInput.split(" ")
 
A = AB[0]
B = AB[1]

TotalCartain = B * 2

if TotalCartain > A or TotalCartain = A:
  print (0)
else:
  print (A-TotalCartain)

Buggy submission (verdict: Runtime Error):
ABInput = str(input())
 
AB = ABInput.split(" ")
 
A = AB[0]
B = AB[1]
 
if B * 2 >= A:
  print (0)
else:
  print (A-B*2)

Buggy submission (verdict: Runtime Error):
ABInput = str(input())

AB = ABInput.split(" ")

A = AB[0]
B = AB[1]

if B * 2 >= A:
  print 0
else:
  print A-B*2

Buggy submission (verdict: Runtime Error):
if B * 2 >= A:
  print 0
else:
  print A-B*2
Problem p02886 (python)

Fixed submission:
N = str(input())
Ds = str(input()).split(" ")
answer = 0
 
for di in range(len(Ds)):
  for dii in range(di+1,len(Ds)):
    sum = int(Ds[di]) * int(Ds[dii])
    answer += sum
print(answer)

Buggy submission (verdict: Runtime Error):
N = str(input())
Ds = str(input()).split(" ")
answer = 0

for di in range(len(Ds)):
  for dii in range(di):
    sum = Ds[di] + Ds[dii] 
    answer += sum

print answer
Problem p02888 (python)

Fixed submission:
N = int(input())
Lines = list(map(int, input().split(" ")))
Lines.sort()
answer = 0
 
import bisect
 
for lineI in range(N):
    for lineJ in range(lineI+1,N):
    	answer += bisect.bisect_left(Lines,Lines[lineI]+Lines[lineJ])-lineJ-1
print(answer)

Buggy submission (verdict: Runtime Error):
N = int(input())
Lines = list(map(int, input().split(" ")))
Lines.sort()
answer = 0

import bisect

for lineI in range(N):
    for lineJ in range(lineI+1,N):
    	answer += bisect.bisect_left(Lines,Lines[lineI]+Lines[lineJ])-j-1
print(answer)

Buggy submission (verdict: Runtime Error):
N = str(input())
N = int(N)
Lines = input().split(" ")
Lines = list(map(int, Lines))
answer = 0

for lineI in range(len(N)):
    for lineJ in range(lineI+1,len(N)):
        for lineK in range(lineJ+1,len(N)):
             if (Lines[lineI] + Lines[lineJ] > Lines[lineK]) and (Lines[lineK] + Lines[lineJ] > Lines[lineI]) and (Lines[lineK] + Lines[lineI] > Lines[lineJ]):
                answer += 1
print(answer)

Buggy submission (verdict: Runtime Error):
N = str(input())
N = int(N)
Lines = input().split(" ")
Lines = list(map(int, Lines))
answer = 0

for lineI in range(len(N)):
    for lineJ in range(lineI+1,len(N)):
        for lineK in range(lineJ+1,len(N)):
             if (Lines[lineI] + Lines[lineJ] > LinesInt[lineK]) and (Lines[lineK] + Lines[lineJ] > Lines[lineI]) and (Lines[lineK] + Lines[lineI] > Lines[lineJ]):
                answer += 1
print(answer)

Buggy submission (verdict: Runtime Error):
N = str(input())
N = int(N)
Lines = input().split(" ")
LinesInt = map(int, Lines)
answer = 0
    
for lineI in range(len(N)):
    for lineJ in range(lineI+1,len(N)):
        for lineK in range(lineJ+1,len(N)):
             if (LinesInt[lineI] + LinesInt[lineJ] > LinesInt[lineK]) and (LinesInt[lineK] + LinesInt[lineJ] > LinesInt[lineI]) and (LinesInt[lineK] + LinesInt[lineI] > LinesInt[lineJ]):
                answer += 1
print(answer)