Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
tmp = 0
for p in P[0:K]:
    tmp += p
high = tmp
for i in range(1, N-K+1):
    tmp -= P[i-1]
    tmp += P[i+K-1]
    if tmp > high:
        high = tmp
        e = i
exp = 0
for p in P[e:e+K]:
    exp += sum(range(1,p+1)) / p

print(exp)

Fixed submission:
import sys
input = sys.stdin.readline
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
tmp = sum(P[:K])
high = tmp
e = 0
for i in range(1, N-K+1):
    tmp -= P[i-1]
    tmp += P[i+K-1]
    if tmp > high:
        high = tmp
        e = i
exp = 0
for p in P[e:e+K]:
    exp += sum(range(1,p+1)) / p

print(exp)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
high = 0
for i in range(N-K+1):
    tmp = 0
    for p in P[i:i+K]:
        tmp += p
    if tmp > high:
        high = tmp
        e = i
exp = 0
for p in P[e:e+K]:
    exp += sum(range(1,p+1)) / p

print(exp)

Fixed submission:
import sys
input = sys.stdin.readline
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
tmp = sum(P[:K])
high = tmp
e = 0
for i in range(1, N-K+1):
    tmp -= P[i-1]
    tmp += P[i+K-1]
    if tmp > high:
        high = tmp
        e = i
exp = 0
for p in P[e:e+K]:
    exp += sum(range(1,p+1)) / p

print(exp)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
high = 0
for i in range(N-K+1):
    tmp = 0
    for p in P[i:i+K]:
        tmp += p
    if tmp > high:
        high = tmp
        e = i
exp = 0
for p in P[e:e+K]:
    exp += sum(range(1,p+1)) / p

print(exp)

Fixed submission:
import sys
input = sys.stdin.readline
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
tmp = sum(P[:K])
high = tmp
e = 0
for i in range(1, N-K+1):
    tmp -= P[i-1]
    tmp += P[i+K-1]
    if tmp > high:
        high = tmp
        e = i
exp = 0
for p in P[e:e+K]:
    exp += sum(range(1,p+1)) / p

print(exp)

Buggy python submission (verdict: Time Limit Exceeded):
# import numpy as np
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
exp = []
for p in P:
    exp.append(sum(range(1,p+1))/p)
high = 0
for i in range(N-K+1):
    tmp = 0
    for e in exp[i:i+K]:
        tmp += e
    if tmp > high:
        high = tmp
print(high)

Fixed submission:
import sys
input = sys.stdin.readline
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
tmp = sum(P[:K])
high = tmp
e = 0
for i in range(1, N-K+1):
    tmp -= P[i-1]
    tmp += P[i+K-1]
    if tmp > high:
        high = tmp
        e = i
exp = 0
for p in P[e:e+K]:
    exp += sum(range(1,p+1)) / p

print(exp)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N = int(input())
P = list(map(int, input().split()))
cnt = 0
for i in range(N):
    if min(P[:i+1]) >= P[i]:
        cnt += 1
print(cnt)

Fixed submission:
import sys
input = sys.stdin.readline
N = int(input())
P = list(map(int, input().split()))
cnt = 0
low = 200001
for i,p in enumerate(P):
    if p < low:
        low = p
    if p <= low:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
import sys
from scipy import special
import numpy as np
import itertools
input = sys.stdin.readline

N = int(input())
# P = int(input().replace(' ', ''))
# Q = int(input().replace(' ', ''))
k = int(special.factorial(N))
# arr = np.arange(k)
# print(P)
# print(Q)
# print(k)
# print(arr)
# print(np.where(arr == 1))
P = tuple(input().split())
Q = tuple(input().split())
p_all = sorted(list(itertools.permutations(P, N)))
q_all = sorted(list(itertools.permutations(Q, N)))
p_in = p_all.index(P)
q_in = q_all.index(Q)
ans = abs(q_in - p_in)
print(ans)

Fixed submission:
import sys
import numpy as np
import itertools
input = sys.stdin.readline

N = int(input())
P = tuple(input().split())
Q = tuple(input().split())
p_all = sorted(list(itertools.permutations(P, N)))
q_all = sorted(list(itertools.permutations(Q, N)))
p_in = p_all.index(P)
q_in = q_all.index(Q)
ans = abs(q_in - p_in)
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
a = max(0, A-K)
K = max(0, K-A)
if K > 0:
    b = max(0, B-K)
print(str(a) + ' ' + str(b))

Fixed submission:
A, B, K = map(int, input().split())
a = max(0, A-K)
K = max(0, K-A)
b = max(0, B-K)
print(str(a) + ' ' + str(b))

Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
a = max(0, A-K)
K = max(0, K-A)
print(max(0, K-A))
if K > 0:
    b = max(0, B-K)
print(str(a) + ' ' + str(b))

Fixed submission:
A, B, K = map(int, input().split())
a = max(0, A-K)
K = max(0, K-A)
b = max(0, B-K)
print(str(a) + ' ' + str(b))

Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = map(int, input().split())
while A > 0 and K > 0:
    A -= 1
    K -= 1
while B > 0 and K > 0:
    B -= 1
    K -= 1
print(str(A) + ' ' + str(B))

Fixed submission:
A, B, K = map(int, input().split())
a = max(0, A-K)
K = max(0, K-A)
b = max(0, B-K)
print(str(a) + ' ' + str(b))
Buggy python submission (verdict: Runtime Error):
s, t = input().split(" ")
a, b = (int(x) for x in input().split(" "))
u = input()
 
if s==u:
  print(s-1,t)
else:
  print(s,t-1)  

Fixed submission:
s, t = input().split(" ")
a, b = (int(x) for x in input().split(" "))
u = input()
 
if s==u:
  print(a-1, b)
else:
  print(a, b-1)

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
a = int(input())
b = int(input())
u = input()

if s==u:
  print(s-1,t)
else:
  print(s,t-1)  

Fixed submission:
s, t = input().split(" ")
a, b = (int(x) for x in input().split(" "))
u = input()
 
if s==u:
  print(a-1, b)
else:
  print(a, b-1)

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
a = int(input())
b = int(input())
u = input()

if u==s:
  print(s-1, t)
else:
  print(s, t-1)

Fixed submission:
s, t = input().split(" ")
a, b = (int(x) for x in input().split(" "))
u = input()
 
if s==u:
  print(a-1, b)
else:
  print(a, b-1)
Buggy python submission (verdict: Time Limit Exceeded):
input()
words = [int(x) for x in input().split(" ")]
save = []
for w in words:
  if w in save:
    print("NO")
    exit()
  save.append(w)
print("YES")

Fixed submission:
len1 = int(input())
len2 = len(set(input().split(" ")))
if len1 == len2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
input()
words = input().split(" ")
save = []
for w in words:
  if w in save:
    print("NO")
    exit()
  save.append(w)
print("YES")

Fixed submission:
len1 = int(input())
len2 = len(set(input().split(" ")))
if len1 == len2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
input()
words = input().split(" ")
for w in words:
  if words.count(w) >= 2:
    print("NO")
    exit()
print("YES")

Fixed submission:
len1 = int(input())
len2 = len(set(input().split(" ")))
if len1 == len2:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
from bisect import bisect_left
N = int(input())
L = [int(x) for x in input().split()]
L.sort()
ans = 0
for a in range(N-2):
    for b in range(a+1, N-1):
        ans += bisect_left(L[b+1:], L[a]+L[b])
print(ans)

Fixed submission:
from bisect import bisect_left
N = int(input())
L = [int(x) for x in input().split()]
L.sort()
ans = 0
for a in range(N-2):
    for b in range(a+1, N-1):
        ans += bisect_left(L[b+1:], L[a]+L[b])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
N = input()
L = [int(x) for x in input().split()]
ans = 0
for a, b, c in combinations(L, 3):
    if a<b+c and b<a+c and c<a+b:
        ans += 1
print(ans)

Fixed submission:
from bisect import bisect_left
N = int(input())
L = [int(x) for x in input().split()]
L.sort()
ans = 0
for a in range(N-2):
    for b in range(a+1, N-1):
        ans += bisect_left(L[b+1:], L[a]+L[b])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
N = input()
L = [int(x) for x in input().split()]
ans = 0
for a, b, c in combinations(L, 3):
    if a<b+c and b<a+c and c<a+b:
        ans += 1
print(ans)

Fixed submission:
from bisect import bisect_left
N = int(input())
L = [int(x) for x in input().split()]
L.sort()
ans = 0
for a in range(N-2):
    for b in range(a+1, N-1):
        ans += bisect_left(L[b+1:], L[a]+L[b])
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S={}
for _ in range(N):
  s = ''.join(sorted(input().rstrip()))
  if s in S:
    S[s] += 1
  else:
    S[s] = 1

ans=0
for s in S.values():
  ans += s*(s-1)//2
  
print(ans)

Fixed submission:
A, B = [int(i) for i in input().split()]
print(max(A+B, A-B, A*B))
Buggy python submission (verdict: Time Limit Exceeded):
#from collections import Counter
#from itertools import combinations
import sys
input = sys.stdin.readline

N = int(input())
S = [sorted(input().rstrip()) for _ in range(N)]
#print(S)

ans = 0
for i in range(N-1):
  for j in range(i+1, N):
    if S[i] == S[j]:
      ans += 1
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
S={}
for _ in range(N):
  s = ''.join(sorted(input().rstrip()))
  if s in S:
    S[s] += 1
  else:
    S[s] = 1

ans=0
for s in S.values():
  ans += s*(s-1)//2
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#from collections import Counter
from itertools import combinations
import sys
input = sys.stdin.readline

N = int(input())
S = [sorted(input().rstrip()) for _ in range(N)]
#print(S)

ans = 0
for s1, s2 in combinations(S, 2):
  if s1 == s2:
    ans +=1
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
S={}
for _ in range(N):
  s = ''.join(sorted(input().rstrip()))
  if s in S:
    S[s] += 1
  else:
    S[s] = 1

ans=0
for s in S.values():
  ans += s*(s-1)//2
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
from itertools import combinations
import sys
input = sys.stdin.readline

N = int(input())
S = [Counter(input().rstrip()) for _ in range(N)]

ans = 0
for s1, s2 in combinations(S, 2):
  if s1 == s2:
    ans +=1
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
S={}
for _ in range(N):
  s = ''.join(sorted(input().rstrip()))
  if s in S:
    S[s] += 1
  else:
    S[s] = 1

ans=0
for s in S.values():
  ans += s*(s-1)//2
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
from itertools import combinations
#from sys.stdin import readline

N = int(input())
S = [input() for _ in range(N)]
ans = 0
for s1, s2 in combinations(S, 2):
  if Counter(s1) == Counter(s2):
    ans +=1
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
S={}
for _ in range(N):
  s = ''.join(sorted(input().rstrip()))
  if s in S:
    S[s] += 1
  else:
    S[s] = 1

ans=0
for s in S.values():
  ans += s*(s-1)//2
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
from itertools import combinations

N = int(input())
S = [Counter(input()) for _ in range(N)]
ans = 0
for s1, s2 in combinations(S, 2):
  if s1 == s2:
    ans +=1
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
S={}
for _ in range(N):
  s = ''.join(sorted(input().rstrip()))
  if s in S:
    S[s] += 1
  else:
    S[s] = 1

ans=0
for s in S.values():
  ans += s*(s-1)//2
  
print(ans)
Buggy python submission (verdict: Runtime Error):
N, L = map(int, input().split())
A = [L+i for i in range(N)]

A.remove(min([abs(a) for a in A]))
print(sum(A))

Fixed submission:
N, L = map(int, input().split())
A = [L+i for i in range(N)]

A.remove(min(max(A), *[abs(a) for a in A]))

print(sum(A))
Buggy python submission (verdict: Runtime Error):
for i in range(0,len(input()))
 print("x",end="")
print()

Fixed submission:
for i in range(0,len(input())):
 print("x",end="")
print()
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

a1 = input()
a2 = input()

list1 = np.array(list(map(int,a1.split(" "))))
list2 = (np.array(list(map(int,a2.split(" "))))+1)/2

res = 0
for i in range(0,len(list2)-list1[1]+1):
    res = max(res,sum(list2[i:i+list1[1]]))
print(res)


Fixed submission:
import numpy as np

a1 = input()
a2 = input()

list1 = np.array(list(map(int,a1.split(" "))))

list2 = (np.array(list(map(int,a2.split(" "))))*10+10)/2

res = 0
now = 0

k = list1[1]
n = list1[0]
i = 0
while i < n:
    now = now + list2[i]
    if i>k-1:
        now = now - list2[i-k]
        res = max(res,now)
    res = max(res,now)
    i = i + 1
print(res/10)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

count = len(s)

for i in range(0,len(s)):
    s1 = s[:i].count("W")
    s2 = s[i:].count("E")
    count = min(count,s1+s2)
print(count)


Fixed submission:
n = int(input())
s = input()

count = s[1:].count("E")
e = s[1:].count("E")
w = s[1:].count("W")
temp = []
temp.append(count)

for i in range(1,len(s)):
    count = temp[-1]
    if s[i-1] == "W":
        count += 1
    if s[i]=="E":
        count -= 1
    temp.append(count)

print(min(temp))

"""
n = input()
s = input()
l = int(n)
count = 0
for i in range(1,l):
    s1 = set(s[:i])
    s2 = set(s[i:])
    count = max(count,len(s1 & s2))
print(count)




"""
Buggy python submission (verdict: Runtime Error):
a,b,k = list(map(int,input().split()))


import numpy as np

X = np.arange(a,b+1)
Y = (X<a+k)+(X>b-k)
count = 0

for i in a:
     if Y[count]:
         print(X[count])
     count+=1

Fixed submission:
a,b,k = list(map(int,input().split()))


temp = []

for i in range(a,a+k):
    temp.append(i)
    if i== b:
        break

for i in range(b-k+1,b+1):
    if i < a:
        continue
    if i in temp:
        continue
    temp.append(i)

for i in temp:
    print(i)

Buggy python submission (verdict: Runtime Error):
a,b,k = list(map(int,input().split()))

temp = []

count = a

while count < a+k:
    if count == b:
        break
    print(count)
    temp.append(count)
    count += 1

count = b-k+1

while count <= b:
    if count < temp[-1]:
        count = temp[-1]
    if count in temp:
        count += 1
        continue
    print(count)
    count += 1



Fixed submission:
a,b,k = list(map(int,input().split()))


temp = []

for i in range(a,a+k):
    temp.append(i)
    if i== b:
        break

for i in range(b-k+1,b+1):
    if i < a:
        continue
    if i in temp:
        continue
    temp.append(i)

for i in temp:
    print(i)
Buggy python submission (verdict: Runtime Error):
a=input()
print(int(a**0.5)*int(a**0.5))

Fixed submission:
a=input()
print(int(int(a)**0.5)*int(int(a)**0.5))
Buggy python submission (verdict: Runtime Error):
x,a,b=raw_input().split()
print max(abs(a-x),abs(b-x))

Fixed submission:
x,a,b=map(int,raw_input().split())
print "B" if abs(a-x)>abs(b-x) else "A"
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)
N = int(raw_input())
dict = {}
for i in range(1,N+1):
    dict[i]={}
for i in range(1,N):
    a = map(int,raw_input().split())
    dict[a[0]].update({a[1]:a[2]})
    dict[a[1]].update({a[0]:a[2]})
leng = {}
q,K = map(int,raw_input().split())
def rec(bef,now):
    leng[now]=leng[bef]+dict[bef][now]
    for i in dict[now]:
        if i in leng:
            continue
        rec(now,i)
leng[K] = 0
for j in dict[K]:
    rec(K,j)
for i in range(0,q):
    a,b = map(int, raw_input().split())
    print leng[a]+leng[b]

Fixed submission:
import sys
sys.setrecursionlimit(10000000)
N = int(raw_input())
dict = {}
for i in range(1,N+1):
    dict[i]={}
for i in range(1,N):
    a = map(int,raw_input().split())
    dict[a[0]].update({a[1]:a[2]})
    dict[a[1]].update({a[0]:a[2]})
leng = {}
q,K = map(int,raw_input().split())
def rec(bef,now):
    leng[now]=leng[bef]+dict[bef][now]
    for i in dict[now]:
        if i in leng:
            continue
        rec(now,i)
leng[K] = 0
for j in dict[K]:
    rec(K,j)
for i in range(0,q):
    a,b = map(int, raw_input().split())
    print leng[a]+leng[b]

Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10000)
N = int(raw_input())
dict = {}
for i in range(1,N+1):
    dict[i]={}
for i in range(1,N):
    a = map(int,raw_input().split())
    dict[a[0]].update({a[1]:a[2]})
    dict[a[1]].update({a[0]:a[2]})
leng = {}
q,K = map(int,raw_input().split())
def rec(bef,now):
    leng[now]=leng[bef]+dict[bef][now]
    for i in dict[now]:
        if i in leng:
            continue
        rec(now,i)
leng[K] = 0
for j in dict[K]:
    rec(K,j)
for i in range(0,q):
    a,b = map(int, raw_input().split())
    print leng[a]+leng[b]


Fixed submission:
import sys
sys.setrecursionlimit(10000000)
N = int(raw_input())
dict = {}
for i in range(1,N+1):
    dict[i]={}
for i in range(1,N):
    a = map(int,raw_input().split())
    dict[a[0]].update({a[1]:a[2]})
    dict[a[1]].update({a[0]:a[2]})
leng = {}
q,K = map(int,raw_input().split())
def rec(bef,now):
    leng[now]=leng[bef]+dict[bef][now]
    for i in dict[now]:
        if i in leng:
            continue
        rec(now,i)
leng[K] = 0
for j in dict[K]:
    rec(K,j)
for i in range(0,q):
    a,b = map(int, raw_input().split())
    print leng[a]+leng[b]
Buggy python submission (verdict: Runtime Error):
S = raw_input()
t = ['dreamer','dream','eraser','erase']
while len(S) > 0:
    for i in t:
        if S[S.rfind(i):]==i:
            S = S[:S.rfind(t)]
            break
        elif i == t[-1]:
            print "NO"
            exit()
print "YES"


Fixed submission:
S = raw_input().split()[0]
t = ['dreameraser','dreamerase','dreamer','dream','eraser','erase']
while len(S) > 0:
    for i in t:
        if S[-len(i):]==i:
            S = S[:-len(i)]
            break
        elif i == t[-1]:
            print "NO"
            exit()
print "YES"

Buggy python submission (verdict: Runtime Error):
S = raw_input()
t = ['dreamer','dream','eraser','erase']
while len(S) > 0:
    for i in t:
        if S[S.rfind(i):]==i:
            S = S[:S.rfind(t)]
            continue
        elif i == t[-1]:
            print "NO"
            exit()
print "YES"

Fixed submission:
S = raw_input().split()[0]
t = ['dreameraser','dreamerase','dreamer','dream','eraser','erase']
while len(S) > 0:
    for i in t:
        if S[-len(i):]==i:
            S = S[:-len(i)]
            break
        elif i == t[-1]:
            print "NO"
            exit()
print "YES"

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(100000)
S = raw_input()
T = ""
t = ['dream','dreamer','erase','eraser']
def rec(T,S):
    if len(S) < len(T):
        return False
    if S==T:
        return True
    elif S[len(T)] == "e":
        return rec(T+t[2],S) or rec(T+t[3],S)
    elif S[len(T)] == "d":
        return rec(T+t[0],S) or rec(T+t[1],S)
    else:
        return False
if rec(T,S):
    print "YES"
else:
    print "NO"


Fixed submission:
S = raw_input().split()[0]
t = ['dreameraser','dreamerase','dreamer','dream','eraser','erase']
while len(S) > 0:
    for i in t:
        if S[-len(i):]==i:
            S = S[:-len(i)]
            break
        elif i == t[-1]:
            print "NO"
            exit()
print "YES"
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
l=list(map(int,input().split()))
a=[]
for i in range(N-K+1):
    b=sum(l[i:i+K])+K
    a.append(b)
    b=0
print(max(a)/2)


Fixed submission:
s,t=map(str,input().split())
a,b=map(int,input().split())
u=str(input())
if s==u:
    a=a-1
if t==u:
    b=b-1
print(a,b)
Buggy python submission (verdict: Runtime Error):
import math
a,b,x=map(int,input().split())
c=b/2
if x<=a*a*c:
    d=2*x/b/a
    print(round(math.degrees(math.atan(b/d)),10))
else:
    x=a*a*b-x
    d=2*x/a/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Fixed submission:
import math
a,b,x=map(int,input().split())
x=x/a
c=b/2
if x<=a*c:
    d=2*x/b
    print(round(math.degrees(math.atan(b/d)),10))
elif x==a*b:
    print(0)
else:
    x=a*b-x
    d=2*x/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Buggy python submission (verdict: Runtime Error):
import math
a,b,x=map(int,input().split())
x=x/a
c=b/2
if x<=a*c:
    d=2*x/b
    print(round(math.degrees(math.atan(b/d)),10))
else:
    x=a*b-x
    d=2*x/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Fixed submission:
import math
a,b,x=map(int,input().split())
x=x/a
c=b/2
if x<=a*c:
    d=2*x/b
    print(round(math.degrees(math.atan(b/d)),10))
elif x==a*b:
    print(0)
else:
    x=a*b-x
    d=2*x/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Buggy python submission (verdict: Runtime Error):
import math
a,b,x=map(int,input().split())
x=x/a
c=b/2
if x<=a*c:
    d=2*x/b
    print(math.degrees(math.atan(b/d)))
else:
    x=a*b-x
    d=2*x/a
    print(90-math.degrees(math.atan(a/d)))

Fixed submission:
import math
a,b,x=map(int,input().split())
x=x/a
c=b/2
if x<=a*c:
    d=2*x/b
    print(round(math.degrees(math.atan(b/d)),10))
elif x==a*b:
    print(0)
else:
    x=a*b-x
    d=2*x/a
    print(round(90-math.degrees(math.atan(a/d)),10))
Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
c=0
L.sort()
for i in range(0,N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            if L[k]>=L[i]+L[j]:
                c+=N-k
                break
N=int((N-2)*(N-1)*N/6-c)
print(N)

Fixed submission:
A,B=map(int,input().split())
if A<=2*B:
    print(0)
else:
    print(A-2*B)
Buggy python submission (verdict: Runtime Error):
def T():
    N=int(input())
    S=input()
    c=''
    t=0
    for s in S:
        if s==c:
            t+=1
        c=s
    return(t)
print(N-T())

Fixed submission:
N=int(input())
S=str(input())
T=0
for i in range(N-1):
    if S[i]==S[i+1]:
        T+=1
print(N-T)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import math
a, b, x = map(int, input().split())
h = x / a ** 2
l = 2 * a * h / b
if l <= a:
    print(math.degrees(math.atan2(b, l)))
else:
    k = 2 * h - b
    m = a * b / (k - b)
    print(90 + math.degrees(math.atan2(m, b)))

Fixed submission:
# coding: utf-8
import math
a, b, x = map(int, input().split())
h = x / a ** 2
l = 2 * a * h / b
if l <= a:
    print(math.degrees(math.atan2(b, l)))
elif x == a ** 2 * b:
    print(0)
else:
    k = 2 * h - b
    m = a * b / (k - b)
    print(90 + math.degrees(math.atan2(m, b)))
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(max(A - 2 * B, 0)

Fixed submission:
A, B = map(int, input().split())
print(max(A - 2 * B, 0))
Buggy python submission (verdict: Runtime Error):
20
xxzaffeeeeddfkkkkllq

Fixed submission:
# coding: utf-8
N = int(input())
S = input()
ans = 1
for i in range(N - 1):
    if S[i] != S[i + 1]:
        ans += 1
print(ans)