Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int,input().split())
S = input()

positions = []
for i in range(len(S)-1):
    if S[i] == 'A':
        if S[i+1] == 'C':
            positions.append(i)
            i+=1

for i in range(Q):
  L, R = map(int,input().split())
  c =0
  for p in positions:
    if L <= p+1 and p+2 <= R:
        c +=1
  print(c)


Fixed submission:
N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
for i in range(N):
  t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
  l, r = map(int, input().split())
  print(t[r-1] - t[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int,input().split())
S = input()

positions = []
for i in range(len(S)-1):
    if S[i] == 'A':
        if S[i+1] == 'C':
            positions.append(i)
            i+=1

for i in range(Q):
  L, R = map(int,input().split())
  c = 0
  for p in positions:
    if L-1 <= p and R-1 >= p+1:
        c+=1
  print(c)


Fixed submission:
N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
for i in range(N):
  t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
  l, r = map(int, input().split())
  print(t[r-1] - t[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int,input().split())
S = input()
for i in range(Q):
  L, R = map(int,input().split())
  ps = S[L-1:R]
  print(ps.count('AC'))

Fixed submission:
N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
for i in range(N):
  t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
  l, r = map(int, input().split())
  print(t[r-1] - t[l-1])
Buggy python submission (verdict: Time Limit Exceeded):
import math
N,M = map(int, input().split())
S = input()
T = input()

if S[0] != T[0]:
  print(-1)
  exit()

lcm = N * M // math.gcd(N, M)
#1,(L/N) +1, 2*(L/N) +1..(N-1)*(L/N)+1
tekito =[]
for i in range(1,N):
  tekito.append(i*(lcm//N)+1)
  
for i in range(1,M):
  k = i*(lcm//M)+1
  if k in tekito:
#    print(k)
#    print(tekito.index(k)+1)
#    print(i)
    if S[tekito.index(k)+1] != T[i]:
      print(-1)
      exit()
print(lcm)

Fixed submission:
import math
N,M = map(int, input().split())
S = input()
T = input()

if S[0] != T[0]:
  print(-1)
  exit()

lcm = N * M // math.gcd(N, M)
#1,(L/N) +1, 2*(L/N) +1..(N-1)*(L/N)+1
tekito =[]
for i in range(1,N):
  tekito.append(i*(lcm//N)+1)
tekitu =[]
for i in range(1,M):
  tekitu.append(i*(lcm//M)+1)

gattai = set(tekito) & set(tekitu) 
for k in gattai:
  i1 = (k-1) // (lcm//N)
  i2 = (k-1) // (lcm//M)
  if S[i1] != T[i2]:
    print(-1)
    exit()
print(lcm)
Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())

ind = -1
for i in range(len(S)):
  if S[i] == 1
    ind = i
  else:
    break

if ind == -1:
  print(S[0])
elif ind + 1 >= K:
  print(1)
else:
  print(S[ind+1])


Fixed submission:
S = input()
K = int(input())

ind = -1
for i in range(len(S)):
  if S[i] == '1':
    ind = i
  else:
    break

if ind == -1:
  print(S[0])
elif ind + 1 >= K:
  print(1)
else:
  print(S[ind+1])
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int,input().split())

for i in range(K):
  ta = B+C
  tb = A+C
  tc = A+B
  A = ta
  B = tb
  C = tc
  if abs(A-B) > 10**18:
    print('Unfair')
    exit()
print(A-B)

Fixed submission:
A,B,C,K = map(int,input().split())

if abs(B-A) > 10**18:
  print('Unfair')
else:
  if K % 2 == 0:
    print(A-B)
  else:
    print(B-A)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
X = list(map(int, input().split()))
sx = sorted(X)
lm = sx[N//2-1]
rm = sx[N // 2]
for i in range(N):
    if sx.index(X[i]) <= N//2 -1:
        print(rm)
    else:
        print(lm)


Fixed submission:
N = int(input())
X = list(map(int, input().split()))
sx = sorted(X)
lm = sx[N//2-1]
rm = sx[N // 2]
for i in range(N):
    if X[i] <= lm:
        print(rm)
    else:
        print(lm)
Buggy python submission (verdict: Runtime Error):
import math
a,b= input().split()
gosei = int(a+b)
tekito = math.ceil(mast.sqrt(100100))
r = 'No'
for i in range(1,tekito+1):
  if i**2 == gosei:
    r = 'Yes'
    break
print(r)

Fixed submission:
import math
a,b= input().split()

gosei = int(a+b)

tekito = math.ceil(gosei)

r = 'No'
for i in range(1,tekito+1):
  if gosei % i == 0 and i == gosei // i:
    r = 'Yes'
    break
print(r)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = list()
    for i in range(n):
        m = input()
        if m in a:
            a.remove(m)
        else:
            a.append(m)
    print(len(a))


if __name__ == "__main__":
    main()


Fixed submission:
N = int(input())
nums = {}
for i in range(N):
    n = int(input())
    if n in nums.keys():
        nums[n] += 1
    else:
        nums[n]=1
c = 0
for te in nums.values():
   if te % 2 == 1:
       c+=1
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
B = [0] * len(A)
C = [0] * len(A)
for i in range(len(A)):
  B[i] = A[i] + 1
  C[i] = A[i] - 1

t= 0
m = 0
for X in range(1 ,10 ** 5 + 1):
  t = A.count(X) + B.count(X) + C.count(X)
  m = max(m,t)
print(m)

Fixed submission:
N = int(input())
As = list(map(int,input().split()))
c = 0
nums = [0]*(10**5+1)
for a in As:
    nums[a]+=1

for i in range(1,len(nums)):
    if i == len(nums)-1:
        t = nums[i - 1] + nums[i]
    else:
        t = nums[i-1]+nums[i]+nums[i+1]
    c = max(c,t)
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int, input().split())
L = [list(map(int,input().split())) for _ in range(M)]
L.sort(key=lambda x: x[0])
funes1 = []
for a,b in L:
    if a == 1:
        funes1.append(b)
    else:
        if a in funes1:
            if b == N:
                print('POSSIBLE')
                exit()
print('IMPOSSIBLE')

Fixed submission:
N,M = map(int, input().split())
L = [list(map(int,input().split())) for _ in range(M)]
L.sort(key=lambda x: x[0])
funes1 = [False]*N
for a,b in L:
    if a == 1:
        funes1[b] = True
    else:
        if funes1[a]:
            if b == N:
                print('POSSIBLE')
                exit()
print('IMPOSSIBLE')

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int, input().split())
L = [list(map(int,input().split())) for _ in range(M)]
L.sort(key=lambda x: x[0])
funes1 = []
for a,b in L:
    if a != 1:
        break
    funes1.append(b)
funes1.sort()
for f in funes1:
    for a,b in L:
        if a > f:
            break
        if f == a:
            if b == N:
                print('POSSIBLE')
                exit()
print('IMPOSSIBLE')




Fixed submission:
N,M = map(int, input().split())
L = [list(map(int,input().split())) for _ in range(M)]
L.sort(key=lambda x: x[0])
funes1 = [False]*N
for a,b in L:
    if a == 1:
        funes1[b] = True
    else:
        if funes1[a]:
            if b == N:
                print('POSSIBLE')
                exit()
print('IMPOSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
N = int(input())
scores = [int(input())for i in range(N)]
sums= sum(scores)
if sums % 10 != 0:
    print(sums)
    exit()
m = 0
flag = False
scores.sort()
for i in range(1,N):
    for j in combinations(scores,i):
        sj = sum(j)
        if (sums - sj) % 10 != 0:
            m = max(m, sums - sj)
            break
print(m)

Fixed submission:
from itertools import combinations
N = int(input())
scores = [int(input())for i in range(N)]
sums= sum(scores)
if sums % 10 != 0:
    print(sums)
    exit()
scores.sort()
for i in range(N):
    if (sums-scores[i]) % 10 != 0:
        print(sums - scores[i])
        exit()
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
N = int(input())
scores = [int(input())for i in range(N)]
sums= sum(scores)
if sums % 10 != 0:
    print(sums)
    exit()
m = 0
flag = False
for i in range(1,N):
    for j in combinations(scores,i):
        sj = sum(j)
        if (sums - sj) % 10 != 0:
            flag = True
            m = max(m, sums - sj)
    if flag:
        break
print(m)

Fixed submission:
from itertools import combinations
N = int(input())
scores = [int(input())for i in range(N)]
sums= sum(scores)
if sums % 10 != 0:
    print(sums)
    exit()
scores.sort()
for i in range(N):
    if (sums-scores[i]) % 10 != 0:
        print(sums - scores[i])
        exit()
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
N = int(input())
scores = [int(input())for i in range(N)]
sums= sum(scores)
if sums % 10 != 0:
    print(sums)
    exit()
m = 0
for i in range(1,N):
    for j in combinations(scores,i):
        sj = sum(j)
        if (sums - sj) % 10 != 0:
            m = max(m, sums - sj)
print(m)

Fixed submission:
from itertools import combinations
N = int(input())
scores = [int(input())for i in range(N)]
sums= sum(scores)
if sums % 10 != 0:
    print(sums)
    exit()
scores.sort()
for i in range(N):
    if (sums-scores[i]) % 10 != 0:
        print(sums - scores[i])
        exit()
print(0)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print('GREATER'if a > b 'EQUAL' elif a == b else 'LESS')


Fixed submission:
A = input()
B = input()

if len(A) > len(B):
  print('GREATER')
elif len(A) < len(B):
  print('LESS')
else:
  for i in range(len(A)):
    if int(A[i]) > int(B[i]):
      print('GREATER')
      exit()
    elif int(A[i]) < int(B[i]):
      print('LESS')
      exit()
  print('EQUAL')
Buggy python submission (verdict: Runtime Error):
O = input()
E = input()

s=''
try:
  for i in range(len(O)):
    s += O[i]
    s+= E[i]
finally:
  print(s)
  

Fixed submission:
O = input()
E = input()

s=''
for i in range(len(O)):
  s += O[i]
  if i < len(E):
    s+= E[i]
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
c = 1
for i in range(N):
    c = c * (i+1)
print(c% (10**9+7))

Fixed submission:
N = int(input())
c = 1
for i in range(N):
    c = (c * (i+1) )% (10**9+7)
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
B = []
for i in range(N):
    a,b = map(int, input().split())
    A.append(a)
    B.append(b)
c = 0
for i in range(N-1,-1,-1):
    if A[i] % B[i] == 0:
        continue
    if A[i] < B[i]:
        push = B[i] - A[i]
    elif A[i] > B[i]:
        push = B[i] - A[i] % B[i]
    c += push
    for j in range(i+1):
        A[j] += push
print(c)

Fixed submission:
N = int(input())
A = []
B = []
for i in range(N):
    a,b = map(int, input().split())
    A.append(a)
    B.append(b)
c = 0
for i in range(N-1,-1,-1):
    if (A[i]+c) % B[i] == 0:
        continue
    if A[i]+c < B[i]:
        push = B[i] - (A[i]+c)
    elif A[i]+c > B[i]:
        push = B[i] - (A[i]+c) % B[i]
    c += push
print(c)
Buggy python submission (verdict: Runtime Error):
K, S = map(int,input()split())

c = 0
for i in range(K+1):
  for j in range(K+1):
    z = S - i - j
    if 0 <= z and z <= K:
      c += 1
print(c)

Fixed submission:
K, S = map(int,input().split())

c = 0
for i in range(K+1):
  for j in range(K+1):
    z = S - i - j
    if 0 <= z and z <= K:
      c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
x,y = map(int, input().split())
if x == y :
    print(0)
elif (-x) == y:
    print(1)
elif x >= 0 and x <= y:
    print(y-x)
elif x >= 0 and x > y:
    if x <= (-y): #10 -11
        print(abs(x-(-y))+1)
    else: # 10 -9
        print(abs(y-(-x))+1)
elif x < 0 and x > y: # -1 -3
    print(min(abs(x-y)+2, -y -x+1))
elif x < 0 and x < y: # -3 -1
    if (-x) < y: # -5 6
        print(min(abs(y-x),abs(y-(-x))+1))
    else:
        rint(abs(y - x))



Fixed submission:
x,y = map(int, input().split())
if x == y :
    print(0)
elif (-x) == y:
    print(1)
elif x >= 0 and x < y: # 0 1
    print(y-x)
elif x >= 0 and x > y: # 5 4 5 -7
    if x <= (-y): #10 -11
        print(abs(x-(-y))+1)
    else: # 10 -9
        print(min(abs(y-(-x))+1,abs(x-y)+2))
elif x < 0 and x > y: # -1 -3
    print(min(abs(x-y)+2, -y -x+1))
elif x < 0 and x < y: # -3 -1
    if y > 0: # -5 6
        print(min(abs(y-x),abs((-y)-x)+1))
    else:
        print(abs(y - x))
Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
c=0
while True:
  if S[0] == 'W':
    oku = 'B'
  else:
    oku = 'W'
  S.insert(0,oku)
  S[1] = oku
  isbreak = False
  for i in range(2,len(S)):
    if S[i] != oku:
      S[i] = oku
    else:
      isbreak = True
      break
      
  if not isbreak:
    break
  c+=1
print(c)
   

Fixed submission:
S = list(input())
c=0
first = S[0]
for i in range(1,len(S)):
  if S[i] != first:
    c+=1
    first = S[i]
print(c)
Buggy python submission (verdict: Runtime Error):
print('Yes'if all(input().count(i)%2==0for i in set(s))else'No')

Fixed submission:
s = input()
ss = set(s)

r = 'Yes'
for w in ss:
  if s.count(w) % 2 == 1:
    r = 'No'
    break
print(r)
Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for i in range(N):
        for j in range(i):
            ans += A[i]*A[j]
            if ans > 10**9+7:
                ans %= (10**9+7)
    print(ans)
resolve()

Fixed submission:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    S = sum(A)
    count = S
    ans = 0
    for i in A:
        count -= i
        ans += count*i
        if ans > 10**9+7:
            ans %= (10**9+7)
    print(ans)
resolve()
Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    X, K, D = map(int, input().split())
    count = min(abs(X//D), K)
    for i in range(count):
        if X > 0:
            X -= D
        else:
            X += D
        K -= 1
    if K > 0:
        if K%2 == 0:
            print(abs(X))
        else:
            print(D-abs(X))
    else:
        print(abs(X))
resolve()

Fixed submission:
def resolve():
    X, K, D = map(int, input().split())
    count = min(abs(X//D), K)
    if X > 0:
        X -= D*count
    else:
        X += D*count
    K -= count
    if K > 0:
        if K%2 == 0:
            print(abs(X))
        else:
            print(D-abs(X))
    else:
        print(abs(X))
resolve()
Buggy python submission (verdict: Runtime Error):
def resolve():
    X, N = map(int, input().split())
    P = [int(input()) for _ in range(N)]
    if X in P:
        for j in range(N):
            if X+j in P:
                continue
            else:
                print(X+j)
                exit()
            if X-j in P:
                continue
            else:
                print(X-j)
                exit()
    else:
        print(X)
resolve()

Fixed submission:
def resolve():
    X, N = map(int, input().split())
    if N != 0:
        P = list(map(int, input().split()))
        S = []
        for _ in range(0, 102):
            if _ in P:
                continue
            else:
                S.append(_)
        if X in S:
            print(X)
        else:
            for i in range(1, 102):
                if X-i in S:
                    print(X-i)
                    exit()
                elif X+i in S:
                    print(X+i)
                    exit()
    else:
        print(X)
resolve()

Buggy python submission (verdict: Runtime Error):
def resolve():
    X, N = map(int, input().split())
    P = []
    for i in range(N):
        p = int(input())
        P.append(p)
    plus = 1
    while True:
        if X in P:
            if plus%2 == 1:
                X -= plus
            else:
                X += plus
        else:
            print(X)
            exit()
        plus += 1
resolve()

Fixed submission:
def resolve():
    X, N = map(int, input().split())
    if N != 0:
        P = list(map(int, input().split()))
        S = []
        for _ in range(0, 102):
            if _ in P:
                continue
            else:
                S.append(_)
        if X in S:
            print(X)
        else:
            for i in range(1, 102):
                if X-i in S:
                    print(X-i)
                    exit()
                elif X+i in S:
                    print(X+i)
                    exit()
    else:
        print(X)
resolve()

Buggy python submission (verdict: Runtime Error):
def resolve():
    X, N = map(int, input().split())
    P = []
    for i in range(N):
        p = int(input())
        P.append(p)
    plus = 1
    while True:
        if X in P:
            if plus%2 == 1:
                X -= plus
                plus +=1
            else:
                X += plus
                plus += 1
        else:
            print(X)
            exit()
resolve()

Fixed submission:
def resolve():
    X, N = map(int, input().split())
    if N != 0:
        P = list(map(int, input().split()))
        S = []
        for _ in range(0, 102):
            if _ in P:
                continue
            else:
                S.append(_)
        if X in S:
            print(X)
        else:
            for i in range(1, 102):
                if X-i in S:
                    print(X-i)
                    exit()
                elif X+i in S:
                    print(X+i)
                    exit()
    else:
        print(X)
resolve()
Buggy python submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 1
    if A.count("0") != 0:
        print("0")
        exit()
    for i in A:
        ans *= i
        if ans > 10**18:
          print("-1")
          exit()
    print(ans)
    exit()
resolve()

Fixed submission:
def resolve():
    A, B = map(int, input().split())
    print(A*B)
resolve()
Buggy python submission (verdict: Runtime Error):
N = input()
print("bon" if N[-1] == 3 else "pon" if N[-1] in == 0 or N[-1] == 1 or N[-1] == 6 or N[-1] == 8 else "hon")

Fixed submission:
N = input()
print("hon" if N[-1] in "24579" else "pon" if N[-1] in "0168" else "bon")
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
if S+1 in T:
  print("Yes")
else:
  print("No")

Fixed submission:
S = input()
T = input()
if S+T[-1] in T:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
if T[T-1] in S:
  print("Yes")
else:
  print("No")

Fixed submission:
S = input()
T = input()
if S+T[-1] in T:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if (A>=K):
  print(K)
else if (A+B>=K):
  print(A)
else:
  print(A-(K-A-B))

Fixed submission:
A, B, C, K = map(int, input().split())
if (A>=K):
  print(K)
if (A<K and A+B>=K):
  print(A)
if (A<K and A+B<K and A+B+C>=K):
  print(A-(K-A-B))
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
H = list(map(int, input().split()))
A = []
B = []
for _ in range(M):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
ans = 0
for i in range(N):
    flag = 0
    for j in range(M):
        if A[j] == i+1:
            if H[B[j]-1] >= H[i]:
                flag = 1
        if B[j] == i+1:
            if H[A[j]-1] >= H[i]:
                flag = 1
    if flag == 0:
        ans += 1
print(ans)

Fixed submission:
N, M = map(int, input().split())
H = list(map(int, input().split()))
count = [0]*N
ans = 0
for _ in range(M):
    a, b = map(int, input().split())
    if H[a-1] > count[b-1]:
        count[b-1] = H[a-1]
    if H[b-1] > count[a-1]:
        count[a-1] = H[b-1]
for i in range(N):
    if H[i] > count[i]:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    N, M = map(int, input().split())
    H = list(map(int, input().split()))
    A = []
    B = []
    ans = 0
    for _ in range(M):
        a, b = map(int, input().split())
        A.append(a-1)
        B.append(b-1)
    while len(set(H)) != 0:
        v = H.index(max(H))+1
        for i in range(M):
            if A[i] == v:
                H[B[i]-1] = 0
            if B[i] == v:
                H[A[i]-1] = 0
        H[v-1] = 0
        ans += 1
    print(ans)
resolve()

Fixed submission:
N, M = map(int, input().split())
H = list(map(int, input().split()))
count = [0]*N
ans = 0
for _ in range(M):
    a, b = map(int, input().split())
    if H[a-1] > count[b-1]:
        count[b-1] = H[a-1]
    if H[b-1] > count[a-1]:
        count[a-1] = H[b-1]
for i in range(N):
    if H[i] > count[i]:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())
while A*C > 0:
  C = C - B
  A = A - D
print("Yes" A>0 else "No")

Fixed submission:
A, B, C, D = map(int, input().split())
Tcount = 0
Acount = 0
while C > 0:
  C = C -B
  Acount = Acount + 1
while A > 0:
  A = A - D
  Tcount = Tcount + 1
print("Yes" if Tcount >= Acount else "No")
Buggy python submission (verdict: Runtime Error):
N = input()
list = [input() for i in range(N)]
print(len(set(list)))

Fixed submission:
N = int(input())
list = [input() for i in range(N)]
print(len(set(list)))

Buggy python submission (verdict: Runtime Error):
N = input()
list = [input() for i in range(N)]
print(len(set(list)))

Fixed submission:
N = int(input())
list = [input() for i in range(N)]
print(len(set(list)))

Buggy python submission (verdict: Runtime Error):
N = input()
list = list(input() for i in range(N))
print(len(set(list)))

Fixed submission:
N = int(input())
list = [input() for i in range(N)]
print(len(set(list)))

Buggy python submission (verdict: Runtime Error):
N = input()
for i in range(N):
  a = input()
print(len(set(i)))

Fixed submission:
N = int(input())
list = [input() for i in range(N)]
print(len(set(list)))

Buggy python submission (verdict: Runtime Error):
N = input()
for i in range(N):
  i = input()
print(len(set(i)))

Fixed submission:
N = int(input())
list = [input() for i in range(N)]
print(len(set(list)))
Buggy python submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(N-1):
        print(A.count(i+1))
    print("0")
resolve()

Fixed submission:
S = int(input())
print(S*2*3.14)

Buggy python submission (verdict: Runtime Error):
S = input()
print(S*2*3.14)

Fixed submission:
S = int(input())
print(S*2*3.14)

Buggy python submission (verdict: Runtime Error):
S = imput()
print(S*2*3.14)

Fixed submission:
S = int(input())
print(S*2*3.14)

Buggy python submission (verdict: Runtime Error):
import math
S = imput()
print(S*2*(math.pi))

Fixed submission:
S = int(input())
print(S*2*3.14)

Buggy python submission (verdict: Runtime Error):
import math
S = imput()
print(S * 2 * math.pi)

Fixed submission:
S = int(input())
print(S*2*3.14)

Buggy python submission (verdict: Runtime Error):
import math
S = imput()
print(S*2*math.pi)

Fixed submission:
S = int(input())
print(S*2*3.14)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
  print(A.count(i+1))

Fixed submission:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = [0]*N
    for i in A:
        ans[i-1] += 1
    for j in ans:
        print(j)
resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(N-1):
        print(A.count(i+1))
    print("0")
resolve()

Fixed submission:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = [0]*N
    for i in A:
        ans[i-1] += 1
    for j in ans:
        print(j)
resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(N):
        print(A.count(i+1))
resolve()

Fixed submission:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = [0]*N
    for i in A:
        ans[i-1] += 1
    for j in ans:
        print(j)
resolve()
Buggy python submission (verdict: Runtime Error):
N = int(input())
print("Yes" if "7" in N else "No")

Fixed submission:
N = input()
print("Yes" if "7" in N else "No")