qyliang/CodeNanoFix huggingface dataset:
Buggy code:
S = str(inpiut())
T = str(input())

S = S+S
if T in S:
  print('Yes')
else:
  print('No')

Fixed code:
S = str(input())
T = str(input())
 
S = S+S
if T in S:
  print('Yes')
else:
  print('No')
Buggy code:
import sys
s = input()
t = input()
for i in len(s):
  ok = 1
  for j in len(s):
    if s[(i+j)%len(s)] != t[j]:
      ok = 0
  if ok == 1:
    print("Yes")
    sys.exit()
print("No")
    

Fixed code:
import sys
s = input()
t = input()
for i in range(len(s)):
  ok = 1
  for j in range(len(s)):
    if s[(i+j)%len(s)] != t[j]:
      ok = 0
  if ok == 1:
    print("Yes")
    sys.exit()
print("No")
Buggy code:
S = input()
T = input()
N = len(S)
flag = False

for i in range(N):
    t = S[-1] + S[:-1]
    if t == T:
        flag = True
        break

if flag:
    print('Yes')
else:
    print('No')

Fixed code:
S = input()
T = input()
N = len(S)
flag = False

for i in range(N):
    t = S[-1] + S[:-1]
    S = t
    if t == T:
        flag = True
        break

if flag:
    print('Yes')
else:
    print('No')
Buggy code:
S = input()
T = input()
a = ""
for i in range(len(S)):
    a += (S[-1] + S[:-1])
    if a == T:
        print("Yes")
else:
    print("No")


Fixed code:
S = input()
T = input()
a = ""
for i in range(len(S)+1):
    if i == 0:
        a = (S[-1] + S[:-1])
    else:
        a = a[-1] + a[:-1]
    if a == T:
        print("Yes")
        break
else:
    print("No")
Buggy code:
S = input()
T = input()
if s in T*2:
    print("Yes")
else:
    print("No")

Fixed code:
S = input()
T = input()
if S in T*2:
    print("Yes")
else:
    print("No")
Buggy code:
S = list(input())
T = list(input())

for i in range(len(S)):
	tmp = S[i:] + [:i]
	if T == tmp:
		print('Yes')
		break
print('No') 

Fixed code:
S = list(input())
T = list(input())

for i in range(len(S)):
	tmp = S[i:] + S[:i]
	if T == tmp:
		print('Yes')
		exit()
print('No')
Buggy code:
S = list(input())
T = list(input())
N = len(S)

for i in range(N-1):
    R = S.copy()

    for j in range(N):
        if j == N-1:
            S[0] = R[N-1]
        else:
            S[j+1] = R[j]

    if T == S:
        print("Yes")
        exit()

print("No")

Fixed code:
S = list(input())
T = list(input())
N = len(S)

for i in range(N):
    R = S.copy()

    for j in range(N):
        if j == N-1:
            S[0] = R[N-1]
        else:
            S[j+1] = R[j]

    if T == S:
        print("Yes")
        exit()

print("No")
Buggy code:
s = input()
t = input()

for i in range(len(s)):
    if s == t:
        print('Yes')
        break
    else:
        s_last = s[-1]
        s = s_last + s[0:len(s)-1]
        print(s)
if s != t:
    print('No')

Fixed code:
s = input()
t = input()
 
for i in range(len(s)):
    if s == t:
        print('Yes')
        break
    else:
        s_last = s[-1]
        s = s_last + s[0:len(s)-1]
if s != t:
    print('No')
Buggy code:
# your code goes here
S = list(input().split())
T = list(input().split())

ans = False
for i in range(len(S)):
	if S == T:
		ans = True
		break
	S.insert(0,S[-1])
	del S[-1]
		
if ans:
	print('Yes')
else:
	print('No')

Fixed code:
# your code goes here
S = list(input())
T = list(input())

ans = False
for i in range(len(S)):
	if S == T:
		ans = True
		break
	S.insert(0,S[-1])
	del S[-1]
		
if ans:
	print('Yes')
else:
	print('No')
Buggy code:
import numpy as np

S_line = input()
T_line = input()

length = len(S_line)

index_list = []
def index_maker(start_n, length):
    for loc in range(length):
        if loc > start_n:
            index_list.append(loc)
        
    for loc in range(start_n + 1):
        #print(str(start_n) +":"+ str(loc))
        index_list.append(loc)
    if start_n + 1 == length:
        return range(length)

    return(index_list)

ac_flag = 0
index_list = []
y_flag = 0

for i in range(length):
    index_list = index_maker(i, length)
    for i, index in enumerate(index_list):
        if T_line[i] != S_line[index]:
            ac_flag += 1
    if ac_flag == 0:
        y_flag += 1
    ac_flag = 0
    index_list = []

if y_flag != 0:
    print("yes")
else:
    print("No")



Fixed code:
import numpy as np

S_line = input()
T_line = input()

length = len(S_line)

index_list = []
def index_maker(start_n, length):
    for loc in range(length):
        if loc > start_n:
            index_list.append(loc)
        
    for loc in range(start_n + 1):
        #print(str(start_n) +":"+ str(loc))
        index_list.append(loc)
    if start_n + 1 == length:
        return list(range(length))

    return(index_list)

ac_flag = 0
index_list = []
y_flag = 0

for i in range(length):
    index_list = index_maker(length-1 - i, length)
    #print(index_list)
    for i, index in enumerate(index_list):
        #print("i: " + str(i) +" index: "+ str(index))
        if T_line[i] != S_line[index]:
            ac_flag += 1
    if ac_flag == 0:
        y_flag += 1
    ac_flag = 0
    index_list = []

if y_flag != 0:
    print("Yes")
else:
    print("No")
Buggy code:
# -*- coding: utf-8 -*-
from collections import deque
import sys
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

S = input()
T = input()

for i in range(N+1):
    if S == T[i:] + T[:i]:
        print("Yes")
        break
else:
    print("No")

Fixed code:
# -*- coding: utf-8 -*-
from collections import deque
import sys
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

S = input()
T = input()

for i in range(len(S)+1):
    if S == T[i:] + T[:i]:
        print("Yes")
        break
else:
    print("No")
Buggy code:
S = input()
T = input()
for i in range(S):
    S = S[-1] + S[:-1]
    if S == T:
        print('Yes')
        exit()
print('No')

Fixed code:
S = input()
T = input()
for i in range(len(S)):
    S = S[-1] + S[:-1]
    if S == T:
        print('Yes')
        exit()
print('No')
Buggy code:
S = input()
T = input()
T = T + T
index = T.find(S)
if S == -1:
	print("No")
else:
	print("Yes")

Fixed code:
S = input()
T = input()
T = T + T
index = T.find(S)
if index == -1:
	print("No")
else:
	print("Yes")
Buggy code:
A = list(input())
T = str(input())

check = 'No'


for i in range(len(A)):
  if ''.join(A) == T:
    check = 'Yes'
  A.insert(A.pop(-1))

print(check)

Fixed code:
A = list(input())
T = str(input())

check = 'No'

for i in range(len(A)):
  if ''.join(A) == T:
    check = 'Yes'
  A.insert(0, A.pop(-1))

print(check)
Buggy code:
s=[i for i in input()]
t=[i for i in input()]
a=0
for i in range(len(s)):
    if s==t:
        a+=1
    s=[s[i] for i in range(-1,len(s)-1)]
print("Yes" if a>=1 else "No")s=[i for i in input()]
t=[i for i in input()]
a=0
for i in range(len(s)):
    if s==t:
        a+=1
    s=[s[i] for i in range(-1,len(s)-1)]
print("Yes" if a>=1 else "No")

Fixed code:
s=[i for i in input()]
t=[i for i in input()]
a=0
for i in range(len(s)):
    if s==t:
        a+=1
    s=[s[i] for i in range(-1,len(s)-1)]
print("Yes" if a>=1 else "No")
Buggy code:
s,t=input().split()
a=0
f=False

for i in range(len(s)):
	a=s[-1]
	s=s[:-1]
	s=a+s
	
	if s==t:
		f=True
		break
		
if f:
	print('Yes')
else:
	print('No')

Fixed code:
s=input()
t=input()
a=0
f=False

for i in range(len(s)):
	a=s[-1]
	s=s[:-1]
	s=a+s
	
	if s==t:
		f=True
		break
		
if f:
	print('Yes')
else:
	print('No')
Buggy code:
def solve():
    s = input()
    t = input()
    for i in range(len(s)):
        if t == s[i:] + s[:i]:
            return True
        else False
if solve():
    print("Yes")
else:
    print("No")


Fixed code:
def solve():
    s = input()
    t = input()
    for i in range(len(s)):
        if t == s[i:] + s[:i]:
            return True
        else:
            False
if solve():
    print("Yes")
else:
    print("No")
Buggy code:
#103b
s=list(input())
t=list(input())

if s==t:
    print('Yes')
    exit()
for i in range(len(s)):
    s.insert(0,s[-1])
    del s[-1]
    if s==t:
        print('Yes')
        break
        exit()
print('No')
        
    

Fixed code:
#103b
s=list(input())
t=list(input())

if s==t:
    print('Yes')
    exit()

for _ in range(len(s)):
    s.insert(0,s[-1])
    del s[-1]
    if s==t:
        print('Yes')
        exit()
print('No')
Buggy code:
S = input()
T = input()
LS=list(S)
LT=list(T)
N=len(LS) 
flag = -1
for i in range(N):
  X=LS.pop()
  LS.insert(0,X)
  if LS==LT:
    flag = 1
if flag == 1:
  print("Yes")
else:
  print("NO")

Fixed code:
S = input()
T = input()
LS=list(S)
LT=list(T)
N=len(LS) 
flag = -1
for i in range(N):
  X=LS.pop()
  LS.insert(0,X)
  if LS==LT:
    flag = 1
if flag == 1:
  print("Yes")
else:
  print("No")
Buggy code:
s, t = [input() for i in range(2)]
for _ in range(len(s)):
  s = s[1:] + s[0]
  if s = t:
    print("Yes") 
    break
else:
  print("No")

Fixed code:
s, t = [input() for i in range(2)]
for _ in range(len(s)):
  s = s[-1] + s[:-1]
  if s == t:
    print("Yes") 
    break
else:
  print("No")
Buggy code:
from collections import deque

S = deque(input())
T = deque(input())

for _ in range(len(S)):
    if S == T:
        print('Yes')
        break
else:
    print('No')




Fixed code:
from collections import deque

S = deque(input())
T = deque(input())

for _ in range(len(S)):
    if S == T:
        print('Yes')
        break
    S.rotate()
else:
    print('No')
Buggy code:
S = input()
T = input()

if S == T:
    print(Yes)
l = len(S)
L = list(S)
for i in range(l):
    a = L[0]
    del L[0]
    L.append(a)
    s = ''.join(L)
    if s == T:
        print('Yes')
        break
else:
    print('No')

Fixed code:
S = input()
T = input()

if S == T:
    print('Yes')
else:
    l = len(S)
    L = list(S)
    for i in range(l):
        a = L[0]
        del L[0]
        L.append(a)
        s = ''.join(L)
        if s == T:
            print('Yes')
            break
    else:
        print('No')
Buggy code:
S = input()
T = input()

flag = False
s_tmp = S
for cnt in range(len(s)):
    s_tmp = s_tmp[-1] + s_tmp[:-1]
    if s_tmp == T:
        flag = True
        break

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

Fixed code:
S = input()
T = input()

flag = False
s_tmp = S
for cnt in range(len(S)):
    s_tmp = s_tmp[-1] + s_tmp[:-1]
    if s_tmp == T:
        flag = True
        break

if flag:
    print("Yes")
else:
    print("No")
Buggy code:
s = input()
t = input()
flag = False
for i in range(len(s)):
    if s == t:
        flag =True
    s = s[-1] + s[::len(s)-1
if flag:
    print("Yes")
else:
    print("No")


Fixed code:
s = input()
t = input()
flag = False
for i in range(len(s)):
    if s == t:
        flag =True
    s = s[-1] + s[0:len(s)-1]
if flag:
    print("Yes")
else:
    print("No")
Buggy code:
s = input()
if s in t = input() * 2:
  print('Yes')
else:
  print('No')

Fixed code:
s = input()
if s in input() * 2:
  print('Yes')
else:
  print('No')
Buggy code:
S = input()
T = input()
S_l = len(S)
while S_l != 0:
    if S == T:
        print("Yes")
        break
    S = S[-1]+S[0:-1]
    print(S)
    S_l -= 1
if S_l == 0:
    print("No")

Fixed code:
S = input()
T = input()
S_l = len(S)
while S_l != 0:
    if S == T:
        print("Yes")
        break
    S = S[-1]+S[0:-1]
    S_l -= 1
if S_l == 0:
    print("No")
Buggy code:
S = input()
T = input()
X = 0
for i in range(len(S)):
  S = S[-1] + S[:-1] 
  print(S)
  if S == T:
    X = 1

if X == 0:
  print('No')
elif X == 1:
  print('Yes')

Fixed code:
S = input()
T = input()
X = 0
for i in range(len(S)):
  S = S[-1] + S[:-1] 
  if S == T:
    X = 1

if X == 0:
  print('No')
elif X == 1:
  print('Yes')
Buggy code:
def rolling(str , n):
    return str[n:len(str)] + str[:n]

S = input()
T = input()
for i in range(len(S)):
    if rolling(S, i) == T:
        print("Yes")
        exit()


Fixed code:
def rolling(str , n):
    return str[n:len(str)] + str[:n]

S = input()
T = input()
for i in range(len(S)):
    if rolling(S, i) == T:
        print("Yes")
        exit()
print("No")
Buggy code:
S = list(input())
T = list(input())
n = len(S)
if S == T :
    print('Yes')
else :
    for i in range(n-1) :
        a = S[n-1]
        S[1:n] = S[0:n-1]
        S[0] = a
        if S == T :
            print('Yes')
    else :
        print('No')

Fixed code:
S = list(input())
T = list(input())
n = len(S)
if S == T :
    print('Yes')
else :
    for i in range(n-1) :
        a = S[n-1]
        S[1:n] = S[0:n-1]
        S[0] = a
        if S == T :
            print('Yes')
            break
    else :
        print('No')
Buggy code:
a=input()
b=input()
for i in range(len(a)):
    if a==b:
        print("Yes")
        break
    
    a=a[-1]+a
    a=a[:len(a)-1]
else:
    print("No"

Fixed code:
a=input()
b=input()
for i in range(len(a)):
    if a==b:
        print("Yes")
        break
    
    a=a[-1]+a
    a=a[:len(a)-1]
else:
    print("No")
Buggy code:
S = input()
T = input()

for i in range(0,len(S)):
    if S == T:
        print('Yes')
        break
    else:
        T = T[len(T)-1]+T[1:]
else:
    print('No')


Fixed code:
S = input()
T = input()

for i in range(0,len(S)):
    if S == T:
        print('Yes')
        break
    else:
        T = T[len(T)-1]+T[0:len(T)-1]
else:
    print('No')
Buggy code:
s=input()
t=input()
result=='No'
for i in range(len(s)-1):
  s=s[-1]+s[:len(s)-1]
  if s==t:
    result='Yes'
print(result)

Fixed code:
s=input()
t=input()
result='No'
for i in range(len(s)):
  s=s[-1]+s[:len(s)-1]
  if s==t:
    result='Yes'
print(result)
Buggy code:
a = input()
b = input()
for i in range(101):
  if a == b:
    print("Yes")
  a = a[-1]+a[:-2]
else:
  print("No")
  

Fixed code:
a = input()
b = input()
for i in range(101):
    if a == b:
        print("Yes")
        break
    a = a[-1]+a[:-1]
else:
    print("No")
Buggy code:
S=input()
s=list(S)
T=input()
t=list(T)
for i in range(len(s)):
  s.insert(0,s[-1])
  print(s)
  s.pop(-1)
  
  print(s)
  if s==t:
    print('Yes')
    exit()
  
print('N

Fixed code:
S=input()
s=list(S)
T=input()
t=list(T)
for i in range(len(s)):
  s.insert(0,s[-1])
  s.pop(-1)
  if s==t:
    print('Yes')
    exit()
  
print('No')
Buggy code:
import sys
input = sys.stdin.readline
S = list(input())
T = list(input())
del S[-1]
del T[-1]
l = len(S)
ans = "No"
for i in range(l) :
    a = S[-1]
    del (S[-1])
    S.insert(0,a)
    print(S)
    if S == T :
        ans = "Yes"
        break
print(ans)


Fixed code:
import sys
input = sys.stdin.readline
S = list(input())
T = list(input())
del S[-1]
del T[-1]
l = len(S)
ans = "No"
for i in range(l) :
    a = S[-1]
    del (S[-1])
    S.insert(0,a)
    if S == T :
        ans = "Yes"
        break
print(ans)
Buggy code:
s = str(input())
t = str(input())

st = False
for i in range(0,len(s)-1):
    s = s[-1]+s[0:len(s)-1]
    if s==t:
        st = True
        print("yes")
        break
if not st:
    print("No")

Fixed code:
s = str(input())
t = str(input())

st = False
for i in range(0,len(s)):
    s = s[-1]+s[0:len(s)-1]
    if s==t:
        st = True
        print("Yes")
        break
if not st:
    print("No")
Buggy code:
S = input()
T = input()

if set(S)!=set(T):
    ans = 'No'

for i in len(S):
    if ans:
        break
    U = S[i:]+S[:i]
    if U==T:
        ans = 'Yes'

if not ans:
    ans = 'No'

print(ans)

Fixed code:
S = input()
T = input()

ans = ''

if set(S)!=set(T):
    ans = 'No'

for i in range(len(S)):
    if ans:
        break
    U = S[i:]+S[:i]
    if U==T:
        ans = 'Yes'

if not ans:
    ans = 'No'

print(ans)
Buggy code:
A = input()
B = input()
for i in range(len(A)):
if(A == B):
　　print("Yes")
　　exit()
　　A = (A+A[0])[1:]
print("No")


Fixed code:
A = input()
B = input()
for i in range(len(A)):
    if A == B:
        print("Yes")
        exit()
    A = (A+A[0])[1:]
print("No")
Buggy code:
s = input()
t = input()
ans = "No"
for i in range(len(s)):
  if s == t:
    ans = "Yes"
    break
  else:
    s = s[1]+s
    s = s[:-1]
print(ans)
    

Fixed code:
s = input()
t = input()
ans = "No"
for i in range(len(s)):
  if s == t:
    ans = "Yes"
    break
  else:
    s = s[-1]+s
    s = s[:-1]
print(ans)
Buggy code:
from collections import deque
s=list(input())
s=deque(s)
t=input()
for i in range(len(s)):
    s.appendleft(s.popleft())
    if t=="".join(s):
        print("Yes")
        exit()
print("No")

Fixed code:
from collections import deque
s=list(input())
s=deque(s)
t=input()
for i in range(len(s)):
    s.appendleft(s.pop())
    if t=="".join(s):
        print("Yes")
        exit()
print("No")
Buggy code:
s=list(input())
t=input()
for i in range(len(s)):
    s.insert(0,s.pop())
    word="".join(s)
    if s==t:
        print("Yes")
        exit()
print("No")

Fixed code:
s=list(input())
t=input()
for i in range(len(s)):
    s.insert(0,s.pop(-1))
    word="".join(s)
    if word==t:
        print("Yes")
        exit()
print("No")
Buggy code:
S = list(input())
T = input()

flag = False

for i in range(1,len(S)):
    word = "".join(S[-i:]+S[:len(S)-i])
    if word == T:
        flag = True

print("Yes") if flag else print("No")

Fixed code:
S = list(input())
T = input()

flag = False

for i in range(1,len(S)+1):
    word = "".join(S[-i:]+S[:len(S)-i])
    if word == T:
        flag = True

print("Yes") if flag else print("No")
Buggy code:
p=input()
q=input()
s=len(p)
u=0
l=len(q)
for i in range(l):
    if p==q[i:s+i]:
        print("Yes")
        u=1
        break
if u==0:
    print("No")

Fixed code:
p=input()
q=input()
q=2*q
s=len(p)
u=0
l=len(q)
for i in range(l):
    if p==q[i:s+i]:
        print("Yes")
        u=1
        break
if u==0:
    print("No")
Buggy code:
s=input()
t=input()
f=False
for i in range(len(t)):
  if s==t[i:]+t[:i]:
    print("Yes")
    break
  if i==len(t):
    print("No")

Fixed code:
s=input()
t=input()
f=False
for i in range(len(t)):
  if s==t[i:]+t[:i]:
    f=True
    break
if f:
  print("Yes")
else:
  print("No")
Buggy code:
S = input()
T = input()
word = [x for x in T]
for i in range(len(word)):
    a = word[0]
    word.append(a)
    word.remove(a)
    if S == word:
        break
    else:
        pass
if S == word:
    print('Yes')
else:
    print('No')

Fixed code:
S = input()
T = input()
word = [x for x in T]
for i in range(len(word)):
    a = word[0]
    word.append(a)
    word.remove(a)
    if S == ''.join(word):
        break
    else:
        pass
if S == ''.join(word):
    print('Yes')
else:
    print('No')
Buggy code:
s = input()
t = input()

for _ in range(len(s)):
    if s = t:
        print('Yes')
        exit()
    s = s[-1]+s[:-1]
print('No')

Fixed code:
s = input()
t = input()

for _ in range(len(s)):
    if s == t:
        print('Yes')
        exit()
    s = s[-1]+s[:-1]
print('No')
Buggy code:
import sys

S = input()
T = input()

for i in range(len(S)):
  s = S[i:] + S[:i]
  if S == T:
    print('Yes')
    sys.exit()
    
print('No')

Fixed code:
import sys
 
S = input()
T = input()
 
for i in range(len(S)):
  s = S[i:] + S[:i]
  if s == T:
    print('Yes')
    sys.exit()
    
print('No')
Buggy code:
a = list(map(int,input().split()))
print(sum(a) - len(a))

Fixed code:
_ = input()
a = list(map(int,input().split()))
print(sum(a) - len(a))
Buggy code:
N = int(input().split())
AN = map(int, input().split())

print(sum(AN)-N)

Fixed code:
N = int(input())
AN = map(int, input().split())
 
print(sum(AN)-N)
Buggy code:
n = int(input().strip())
data = list(map(int, input().split())
print (sum(data) - n)

Fixed code:
n = int(input().strip())
data = list(map(int, input().split()))

print (sum(data) - n)
Buggy code:
N = int(input())
L = [int(i) for i in input().split()]
print(sum(L - N) )

Fixed code:
N = int(input())
L = [int(i) for i in input().split()]
print(sum(L) - N)
Buggy code:
n = int(input())
ns = map(int, input().split())
print(sum(ns)-len(ns))

Fixed code:
n = int(input())
ns = list(map(int, input().split()))
print(sum(ns)-len(ns))
Buggy code:
n=int(input())
l = list(map(int, input().split()))
print(sum(l) = n)

Fixed code:
n=int(input())
l = list(map(int, input().split()))
print(sum(l) - n)
Buggy code:
print(-int(input())+sum(int(i) for i in input().split())))

Fixed code:
print(-int(input())+sum(int(i) for i in input().split()))
Buggy code:

###template###
import sys
def input(): return sys.stdin.readline().rstrip()
import heapq
INF = float("inf")
def mi(): return map(int, input().split())
def ii(): return int(input())
###template###

N = ii()
As = [map(lambda x : int(x) - 1, input().split())]

print(sum(As))

Fixed code:
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
import heapq
INF = float("inf")
def mi(): return map(int, input().split())
def ii(): return int(input())
###template###

N = ii()
As = list(map(lambda x : int(x) - 1, input().split()))

print(sum(As))
Buggy code:
from functools import reduce
n = (int)(input())
a = (list)(map(int, input().split()))


def calcMod(a, m):
  return sum([m % v for v in a])


def mul(a, b):
  return a*b


#print(calcMod(a, reduce(mul, a)-1))
print(sum(a)-N)


Fixed code:
from functools import reduce
n = (int)(input())
a = (list)(map(int, input().split()))


def calcMod(a, m):
  return sum([m % v for v in a])


def mul(a, b):
  return a*b


#print(calcMod(a, reduce(mul, a)-1))
print(sum(a)-n)
Buggy code:
def main(n, a):
    ans = 0

    for i in a:
        ans += i - 1

    print(ans)


if __name__ == "__main__":
    n = int(input())
    a = lis(map(int, input().split()))

    main(n, a)


Fixed code:
def main(n, a):
    ans = 0

    for i in a:
        ans += i - 1

    print(ans)


if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))

    main(n, a)
Buggy code:
# 103C
N=int(input())
a=list(map(int,input().split()))
a=set(a)
print(sum(a)-len(a))

Fixed code:
##### 103C
N=int(input())
a=list(map(int,input().split()))
print(sum(a)-len(a))
Buggy code:
input()

ans = 0
a = [int(i) for i in input().split()]

for num in a:
  ans += num - 1
  
 print(ans)

Fixed code:
a  = input()
 
ans = 0
a = [int(i) for i in input().split()]
 
for num in a:
  ans += num - 1
  
print(ans)
Buggy code:
n = int(input())
a = list(map(int, input().split())
print(sum(a)-n)

Fixed code:
n = int(input())
a = list(map(int,input().split()))
print(sum(a)-len(a))
Buggy code:
n = int(input())
a = list(int, input().split())

print(sum(a)-n)

Fixed code:
n = int(input())
a = list(map(int,input().split()))

print(sum(a)-n)
Buggy code:
n, aa = [list(map(lambda x:int(x), s.split())) for s in open(0)]

sum(a-1 for a in aa)

Fixed code:
n, aa = [list(map(lambda x:int(x), s.split())) for s in open(0)]

print(sum(a-1 for a in aa))
Buggy code:
import sys
readline = sys.stdin.readline
n = int(readline())
print(sum([int(i) for i in readline().split()] - n)

Fixed code:
import sys
readline = sys.stdin.readline
n = int(readline())
print(sum([int(i) for i in readline().split()]) - n)
Buggy code:
n=input()
print(sum([int(j) for j in input().split()])-n)

Fixed code:
n=int(input())
print(sum([int(j) for j in input().split()])-n)
Buggy code:
n=input()
a=list(map(int,input().split()))
print(sum(a)-n)

Fixed code:
n = int(input())
a = map(int, input().split())
print(sum(a) - n)
Buggy code:
print((lambda a,b:sum(b)-a)(input(),list(map(int,input().split()))))

Fixed code:
print((lambda a,b:sum(b)-int(a))(input(),list(map(int,input().split()))))
Buggy code:
n = int(input())
a = list(map(int, input().split()))

m = [int(a[i] - 1) for i in range(n)]
print(m)
ans = 0
for i in range(n):
    ans = ans + m[i]
print(ans)

Fixed code:
n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in range(n):
    ans += a[i] - 1

print(ans)
Buggy code:
N = input()
A = list(map(int, input().split()))
ans = 0
for i in range(N):
  ans += A[i]-1
print(ans)

Fixed code:
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(N):
  ans += A[i]-1
print(ans)
Buggy code:
N = int(input())
a = list(map(int, input().split()))

f = sum(a)-N
print(a)

Fixed code:
N = int(input())
a = list(map(int, input().split()))

f = sum(a)-N
print(f)
Buggy code:
print(sum(map(lambda x: x-1, list(map(int,input().split())))))

Fixed code:
input();print(sum(list(map(lambda x:x-1,list(map(int,input().split()))))))
Buggy code:
sa = list(map(int,input().split()))
ans = 0
for i in sa:
    ans += (i-1)
print(ans)

Fixed code:
aaa = input()
sa = list(map(int,input().split()))
ans = 0
for i in sa:
    ans += (i-1)
print(ans)
Buggy code:
a = input(int())
l = list(map(int, input().split()))
k = sum(l)-len(l)
print(int(k))

Fixed code:
a = input()
l = list(map(int, input().split()))
print(sum(l)-len(l))