qyliang/CodeNanoFix huggingface dataset:
Buggy code:
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26

def score_down(d):
    ans = 0
    for i in range(26):
        ans += c[i]*(d - last[i])
    return ans

for d in range(D):
    score = [(s[d][i] - score_down(d)) for i in range(D)]
    t = score.index(max(score))
    print(t+1)
    last[t] = d


Fixed code:
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26

def score_down(d):
    ans = 0
    for i in range(26):
        ans += c[i]*(d - last[i])
    return ans

for d in range(D):
    score = [(s[d][i] - score_down(d+1)) for i in range(26)]
    t = score.index(max(score))
    print(t+1)
    last[t] = d+1
Buggy code:
D = int(input())
c = list(map(int, input().split()))
s = []

for i in range(D):
    tmp = list(map(int, input().split()))
    s.append(tmp)


ans = 0
for l in s:
    for i in range(26):
        l[i] = (l[i], i)
    l.sort(reverse=True)
    print(l[0][1])


Fixed code:
D = int(input())
c = list(map(int, input().split()))
s = []

for i in range(D):
    tmp = list(map(int, input().split()))
    s.append(tmp)


ans = 0
for l in s:
    for i in range(26):
        l[i] = (l[i], i)
    l.sort(reverse=True)
    print(l[0][1]+1)
Buggy code:
import numpy as np

D = int(input())

C = ([int(x) for x in input().split()])

for d in range(D):
        exec('s{} = ([int(x) for x in input().split()])'.format(d))

S = 0
d = 0
lday = np.array([0] * 26)
C = np.array(C)

while d != D:
    exec("curs = np.array(s{})".format(d))
    pos_max_i = np.argmax(curs)
    neg_min_i = np.argmin(C * ( np.array([d]*26 ) * lday ))
    if np.abs(curs[pos_max_i]) > np.abs(curs[neg_min_i]):
        S += curs[pos_max_i]
        lday[pos_max_i] = d
        print(pos_max_i)
    else:
        S += curs[neg_min_i]
        lday[neg_min_i] = d
        print(neg_min_i)
    d += 1

Fixed code:
import numpy as np

D = int(input())

C = ([int(x) for x in input().split()])

for d in range(D):
        exec('s{} = ([int(x) for x in input().split()])'.format(d))

d = 0
lday = np.array([0] * 26)
C = np.array(C)

while d != D:
    exec("curs = np.array(s{})".format(d))
    pos_max_i = np.argmax(curs)
    decl = C * ( np.array([d]*26 ) - lday )
    neg_min_i = np.argmin(decl)
    if np.abs(curs[pos_max_i]) > np.abs(decl[neg_min_i]):
        lday[pos_max_i] = d
        print(pos_max_i+1)
    else:
        lday[neg_min_i] = d
        print(neg_min_i+1)
    d += 1
Buggy code:
import numpy as np
D = int(input())
s = [input() for i in range(D+1)]
for i in range(0,D+1):
    s[i] = s[i].split()
    s[i] = [int(p) for p in s[i]]
a = []
b = [0]*len(s[0])
S = 0
for i in range (1,D+1):
    mx = np.argmax(s[i])
    for j in range(0,len(s[0])):
        if j == mx:
            b[j] = 0
        else:
            b[j] = b[j] + s[0][j]

    S = S + s[i][mx] - sum(b)
    a.append(S)
for i in (a):
    print(i)

Fixed code:
import numpy as np
D = int(input())
s = [input() for i in range(D+1)]
for i in range(0,D+1):
    s[i] = s[i].split()
    s[i] = [int(p) for p in s[i]]
a = []
b = [0]*len(s[0])
S = 0
for i in range (1,D+1):
    mx = np.argmax(s[i])
    for j in range(0,len(s[0])):
        if j == mx:
            b[j] = 0
        else:
            b[j] = b[j] + s[0][j]
    S = S + s[i][mx] - sum(b)
    a.append(mx+1)
for i in (a):
    print(i)
Buggy code:
from collections import Counter
D = int(input())
c = list(map(int, input().split()))
s = []
for i in range(D):
    temp_s = list(map(int, input().split()))
    s.append(temp_s)
my_count = Counter()
for i in range(D):
    for j in range(26):
        my_count[j] = s[i][j]
    print(max(my_count, key=my_count.get))

Fixed code:
from collections import Counter
D = int(input())
c = list(map(int, input().split()))
s = []
for i in range(D):
    temp_s = list(map(int, input().split()))
    s.append(temp_s)
my_count = Counter()
for i in range(D):
    for j in range(26):
        my_count[j + 1] = s[i][j]
    print(max(my_count, key=my_count.get))
Buggy code:
import sys
import numpy as np
from operator import mul
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

d = int(readline())
c = list(map(int, readline().split()))
s = []
for _ in range(d):
    add = list(map(int, readline().split()))
    s.append(add)

#t = [0] * d
day = 0
satisfy = 0
sumC = sum(c)
count = np.zeros(26)

for i in range(d):
    #t = int(readline()) - 1
    tarLis = s[day]
    tar = max(tarLis)
    t = tarLis.index(tar)
    up = s[day][t]
    count += 1
    count[t] = 0
    sub = map(mul, count, c)
    satisfy += (up - sum(sub))

    # satisfy
    print(int(satisfy))
    day += 1


Fixed code:
import sys
import numpy as np
from operator import mul
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

d = int(readline())
c = list(map(int, readline().split()))
s = []
for _ in range(d):
    add = list(map(int, readline().split()))
    s.append(add)

#t = [0] * d
day = 0
satisfy = 0
sumC = sum(c)
count = np.zeros(26)

for i in range(d):
    #t = int(readline()) - 1
    tarLis = s[day]
    tar = max(tarLis)
    t = tarLis.index(tar) + 1
    print(t)
    day += 1
    '''
    up = s[day][t]
    count += 1
    count[t] = 0
    sub = map(mul, count, c)
    satisfy += (up - sum(sub))

    # satisfy
    print(satisfy)
    '''
Buggy code:
import numpy as np

D = int(input())
c = np.array(list(map(int, input().split())))
s = np.array([list(map(int, input().split())) for x in range(D)])

l_opt = s.argmax(axis=1)
for l in l_opt:
    print(l)

Fixed code:
import numpy as np

D = int(input())
c = np.array(list(map(int, input().split())))
s = np.array([list(map(int, input().split())) for x in range(D)])

l_opt = s.argmax(axis=1)
for l in l_opt:
    print(l + 1)
Buggy code:
import numpy as np
from functools import partial
D = int(input())
C = list(map(int, input().split()))
B = np.array([0] * 26)
S = [list(map(int, input().split())) for _ in range(D)]

def calc_satisfaction(d, t):
    B[t-1] = d
    satiety = sum(C * (d - B))
    return S[d-1][t-1] - satiety

satisfaction = 0
for d in range(1, D+1):
    f = partial(calc_satisfaction, d)
    satisfaction += max([t for t in range(1, 27)], key=f)
    print(satisfaction)

Fixed code:
import numpy as np
from functools import partial
D = int(input())
C = list(map(int, input().split()))
B = np.array([0] * 26)
S = [list(map(int, input().split())) for _ in range(D)]

def calc_satisfaction(d, t):
    _B = np.array(B)
    _B[t-1] = d
    satiety = sum(C * (d - B))
    return S[d-1][t-1] - satiety

satisfaction = 0
for d in range(1, D+1):
    f = partial(calc_satisfaction, d)
    t, satisfaction_d = max([(t, f(t)) for t in range(1, 27)], key=lambda x: x[1])
    B[t-1] = d
    satisfaction += satisfaction_d
    print(t)
Buggy code:
def resolve():
    D = int(input())
    C = [int(x) for x in input().split()]
    S = []
    for i in range(D):
        S.append(list(map(int, input().split())))
    last_d = []
    score = 0
    t = 0

    for i in range(len(C)):
        t = max(t, C[i])

    for d in range(D):
        score += S[d][t[d] - 1]
        last_d.append(t[d] - 1)
        for i in range(len(C)):
            if i in last_d:
                score -= C[i] * last_d[::-1].index(i)
            else:
                score -= C[i] * (d + 1)
        print(score)

    
if __name__ == "__main__":
    resolve()

Fixed code:
def resolve():
    D = int(input())
    C = [int(x) for x in input().split()]
    S = []
    for i in range(D):
        S.append(list(map(int, input().split())))
    last_d = []
    score = 0

    for d in range(D):
        contest = 0
        for i in range(len(C)):
            contest = max(contest, S[d][i])
        score += contest
        last_d.append(S[d].index(contest))
        for i in range(len(C)):
            if i in last_d:
                score -= C[i] * last_d[::-1].index(i)
            else:
                score -= C[i] * (d + 1)
        print(S[d].index(contest) + 1)

    
if __name__ == "__main__":
    resolve()
Buggy code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
import numpy as np

def scores(c, s, t):
    last = [0] * 26
    V = []
    lastv = 0
    for d, i in enumerate(t):
        last[i] = d+1
        v = s[d*26+i]
        sub = sum([c[j]*(d+1-last[j]) for j in range(26)])
        # print(v, sub)
        lastv += v-sub
        V.append(lastv)
    return V


def main():
    D, *cs = map(int, read().split())
    c = cs[:26]
    s = cs[26:]

    b = 0
    ans = []
    for d in range(D):
        maxi = 0
        score_max = -1000000000
        for i in range(26):
            if scores(c, s, ans + [i])[-1] > score_max:
                maxi = i
        ans.append(maxi)
        b += 26

    ans = [a+1 for a in ans]
    print(*ans, sep='\n')

if __name__ == '__main__':
    main()

Fixed code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
import numpy as np

def scores(c, s, t):
    last = [0] * 26
    V = []
    lastv = 0
    for d, i in enumerate(t):
        last[i] = d+1
        v = s[d*26+i]
        sub = sum([c[j]*(d+1-last[j]) for j in range(26)])
        # print(v, sub)
        lastv += v-sub
        V.append(lastv)
    return V


def main():
    D, *cs = map(int, read().split())
    c = cs[:26]
    s = cs[26:]

    b = 0
    ans = []
    for d in range(D):
        maxi = 0
        for i in range(26):
            if s[b+i] > s[b+maxi]:
                maxi = i
        ans.append(maxi + 1)
        b += 26

    print(*ans, sep='\n')

if __name__ == '__main__':
    main()
Buggy code:
D=int(input())
c = [int(i) for i in input().split()]
s=[]
for i in range(D):
    s.append([int(j) for j in input().split()])

tst = [0] * 26
last = [0] * 26

ans =[]
for i in range(D):
    a = s[i]
    x,y = 0,0
    for i,v in enumerate(a):
        if x < v:
            x = v
            y = i
    print(x,y)
    ans.append(y+1)
    tst[y] += a[y]
    last[y] = i+1
    for k in range(26):
        if k != y:
            tst[k] -= (i+1 - last[k])*c[k]
print(tst)
for i in ans:
    print(i)


Fixed code:
D=int(input())
c = [int(i) for i in input().split()]
s=[]
for i in range(D):
    s.append([int(j) for j in input().split()])

tst = [0] * 26
last = [0] * 26

ans =[]
for i in range(D):
    a = s[i]
    x,y = 0,0
    for i,v in enumerate(a):
        if x < v:
            x = v
            y = i
    ans.append(y+1)
    tst[y] += a[y]
    last[y] = i+1
    for k in range(26):
        if k != y:
            tst[k] -= (i+1 - last[k])*c[k]
for i in ans:
    print(i)
Buggy code:
def main():
    D = int(input())
    c = list(map(int, input().split()))
    last = [0] * 27
    for d in range(1, D+1):
        s = list(map(int, input().split()))
        max_s = max(s)
        index_s = s.index(max_s)
        print(index_s)


if __name__ == '__main__':
    main()


Fixed code:
def main():
    D = int(input())
    c = list(map(int, input().split()))
    last = [0] * 27
    for d in range(1, D+1):
        s = list(map(int, input().split()))
        max_s = max(s)
        index_s = s.index(max_s)
        print(index_s + 1)


if __name__ == '__main__':
    main()
Buggy code:
N = 26
D = int(input())
C = [int(i) for i in input().split()]

S = []
for i in range(D):
  s = [int(i) for i in input().split()]
  m = max(s)
  i = s.index(m)
  S.append(i)

for i in S:
  print(i)

Fixed code:
N = 26
D = int(input())
C = [int(i) for i in input().split()]

S = []
for i in range(D):
  s = [int(i) for i in input().split()]
  m = max(s)
  i = s.index(m)
  S.append(i+1)

for i in S:
  print(i)
Buggy code:
D = int(input())
c = list(map(int, input().split()))
S = [list(map(int, input().split())) for i in range(D)]
#T = [int(input()) for i in range(D)]
SUM = 0
last = [0] * 28
for d in range(1, D + 1):
    i = S[d].index(max(S[d]))
    print(i)

Fixed code:
D = int(input())
c = list(map(int, input().split()))
S = [list(map(int, input().split())) for i in range(D)]
#T = [int(input()) for i in range(D)]
SUM = 0
last = [0] * 28
for d in range(1, D + 1):
    i = S[d - 1].index(max(S[d - 1]))
    print(i + 1)
Buggy code:
d = int(input())
c = tuple(map(int, input().split()))
s = [
    tuple(map(int, input().split()))
    for _ in range(d)
]

m = 0
ans = []
last = [0] * 26
for i in range(d):
    # for all contest
    mdmax = -10000000000000000
    mdi = 0
    for j, ss in enumerate(s[i]):
        md = 0
        # choose one contest to open
        for k in range(26):
            if j == k:
                md += ss
            else:
                md -= (i + 1 - last[k]) * c[k]
        if md > mdmax:
            mdi = j
            mdmax = md

    ans.append(mdi + 1)
    m += mdmax

    last[mdi] = d + 1

for a in ans:
    print(a)
print(m)

Fixed code:
d = int(input())
c = tuple(map(int, input().split()))
s = [
    tuple(map(int, input().split()))
    for _ in range(d)
]

m = 0
ans = []
last = [0] * 26
for i in range(d):
    # for all contest
    mdmax = -10000000000000000
    mdi = 0
    for j, ss in enumerate(s[i]):
        md = 0
        # choose one contest to open
        for k in range(26):
            if j == k:
                md += ss
            else:
                if last[k] > 0:
                    md -= (i + 1 - last[k]) * c[k]
        if md > mdmax:
            mdi = j
            mdmax = md

    ans.append(mdi + 1)
    m += mdmax

    last[j] = d + 1

for a in ans:
    print(a)
# print(m)
Buggy code:
from random import randint

D = int(input())
C = list(map(int, input().split()))
S = [list(map(int, input().split())) for _ in range(D)]
T = []

for i in range(D):
    T.append(S[i].index(max(S[i])))
print(*T, sep="\n")

Fixed code:
from random import randint

D = int(input())
C = list(map(int, input().split()))
S = [list(map(int, input().split())) for _ in range(D)]
T = []

for i in range(D):
    l = S[i].index(max(S[i]))
    T.append(l+1)
    
print(*T, sep="\n")
Buggy code:
import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
for i in range(D):
  x = np.array(list(map(int, input().split())))
  s.append(c[x.argmax()])
for i in range(D):
  print(s[i])

Fixed code:
import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
for i in range(D):
  x = np.array(list(map(int, input().split())))
  s.append(x.argmax())
for i in range(D):
  print(s[i]+1)
Buggy code:
D = int(input())#D=365
c = list(map(int, input().split()))#0<=c<=100
s = [list(map(int, input().split())) for _ in range(D)]#0<=s<=20000

t = []
for d in range(D):
    t.append(s.index(max(s[d])) + 1)

for i in range(D):
    print(t[i])

Fixed code:
D = int(input())#D=365
c = list(map(int, input().split()))#0<=c<=100
s = [list(map(int, input().split())) for _ in range(D)]#0<=s<=20000

t = []
for d in range(D):
    t.append(s[d].index(max(s[d])) + 1)

for i in range(D):
    print(t[i])
Buggy code:
day = [0 for i in range(26)]
for i in range(d):
    s.append(list(map(int,input().split())))
ans = 0
num = 1
for i in s:
    max_index = -1
    large = 0
    for j in range(26):
        if large < i[j]:
            large = i[j]
            if not max_index == -1:
                ans -= c[max_index]*(num-day[max_index])
            max_index = j
        else:
            ans -= c[j]*(num-day[j])
    day[max_index] = num
    ans += large
    print(max_index+1)
    num += 1

Fixed code:
d = int(input())
c = list(map(int,input().split()))
s = []
day = [0 for i in range(26)]
for i in range(d):
    s.append(list(map(int,input().split())))
ans = 0
for i in s:
    max_index = -1
    large = 0
    for j in range(26):
        if large < i[j]:
            large = i[j]
            if not max_index == -1:
                day[max_index] += 1
                ans -= c[max_index]
            max_index = j
        else:
            day[j] += 1
            ans -= c[j]
    day[max_index] = 0
    ans += large
    print(max_index+1)
Buggy code:
import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
f=[]
for i in range(D):
  if(i%26 == 0):
    f = [0]*26
  x = np.array(list(map(int, input().split())))
  for j in range(26):
    if(f[j]!=0):
      x.delete(1,j)
  s.append(x.argmax())
for i in range(D):
  print(s[i])

Fixed code:
import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
f=[]
for i in range(D):
  if(i%26 == 0):
    f = [0]*26
  x = np.array(list(map(int, input().split())))
  for j in range(26):
    if(f[j]!=0):
      x.delete(1,j)
  s.append(x.argmax())
for i in range(D):
  print(s[i]+1)
Buggy code:
def main():
    import sys
    read = sys.stdin.buffer.read
    readline = sys.stdin.buffer.readline
    readlines = sys.stdin.buffer.readlines
    sys.setrecursionlimit(10 ** 7)

    d = int(readline())
    c = list(map(int, readline().split()))
    s = [list(map(int, readline().split())) for _ in range(d)]
    for i in range(1, d + 1):
        print(i)


if __name__ == '__main__':
    main()


Fixed code:
def main():
    import sys
    read = sys.stdin.buffer.read
    readline = sys.stdin.buffer.readline
    readlines = sys.stdin.buffer.readlines
    sys.setrecursionlimit(10 ** 7)

    d = int(readline())
    c = list(map(int, readline().split()))
    s = [list(map(int, readline().split())) for _ in range(d)]
    for i in range(d):
        print(s[i].index(max(s[i])) + 1)


if __name__ == '__main__':
    main()
Buggy code:
import numpy as np

D = int(input())
C = list(map(int, input().split()))
for d in D:
    S = np.array(map(int, input().split()))
    print(np.argmax(S)+1)

Fixed code:
import numpy as np

D = int(input())
C = list(map(int, input().split()))
for d in range(D):
    S = np.array(list(map(int, input().split())))
    print(np.argmax(S)+1)
Buggy code:
d=int(input())
c=list(map(int,input().split()))
c_days=[0]*26

fir_ans=0
for i in range(d):
    s=list(map(int,input().split()))
    ss=sorted(s, reverse=True)
    for k in range(26):
        num=ss[k]
        n=s.index(num)
        if c_days[n]==0:

            fir_ans+=num
            continue 
    c_days[n]=i+1
    for l in range(26):
        los=c[l]*(i+1-c_days[l])
        fir_ans-=los
    print(fir_ans)

Fixed code:
d=int(input())
c=list(map(int,input().split()))
c_days=[0]*26

fir_ans=0
for i in range(d):
    s=list(map(int,input().split()))
    ss=sorted(s, reverse=False)
    for k in range(26):
        num=ss[k]
        n=s.index(num)
        if c_days[n]==0:

            fir_ans+=num
            continue 
    c_days[n]=i+1
    print(n+1)
    '''
    for l in range(26):
        los=c[l]*(i+1-c_days[l])
        fir_ans-=los
    print(fir_ans)
    '''
Buggy code:
d = int(input())
c = list(map(int, input().split()))
s = np.array([list(map(int, input().split())) for _ in range(d)])

init = s.argmax(axis=1) + 1

for i in range(d):
    print(init[i])

Fixed code:
import numpy as np
d = int(input())
c = list(map(int, input().split()))
s = np.array([list(map(int, input().split())) for _ in range(d)])

init = s.argmax(axis=1) + 1

for i in range(d):
    print(init[i])
Buggy code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    d = i_input()
    c_list = i_list()
    s_list = i_row_list(d)

    for i in range(d):
        tmp = s_list[i][s_list[i][i]%26+1] % 26 + 1
        print(tmp)

if __name__ == '__main__':
    main()


Fixed code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    d = i_input()
    c_list = i_list()
    s_list = i_row_list(d)

    for i in range(d):
        print(s_list[i].index(max(s_list[i]))+1)

if __name__ == '__main__':
    main()
Buggy code:
import sys
input = sys.stdin.buffer.readline
import numpy as np

D = int(input())
c = np.array(input().split(), dtype=np.int32)
s = np.array([input().split() for _ in range(D)], dtype=np.int32)
last = np.zeros(26, dtype=np.int32)


ans = []
point = 0
for i in range(D):
    down = (i+1-last)*c
    loss = down * 3 + s[i,:]
    idx = np.argmax(loss)
    ans.append(idx+1)
    point += s[i, idx] - down.sum()
    last[idx] = i+1
    print(down)
    
for i in range(D):
    print(ans[i])

Fixed code:
import sys
input = sys.stdin.buffer.readline
import numpy as np

D = int(input())
c = np.array(input().split(), dtype=np.int32)
s = np.array([input().split() for _ in range(D)], dtype=np.int32)
last = np.zeros(26, dtype=np.int32)
# print(s)
# print(s.shape)

ans = []
point = 0
for i in range(D):
    down = (i+1-last)*c
    loss = down + s[i,:]*3
    idx = np.argmax(loss)
    ans.append(idx+1)
    point += s[i, idx] - down.sum()
    last[idx] = i+1
    # print(loss)

for i in range(D):
    print(ans[i])
Buggy code:
D,*CS = map(int, open(0).read().split())
C = CS[:26]
S = [CS[26*i:26*(i+1)] for i in range(1, D+1)]

def imax(xs):
    m = -1
    i = 0
    for j, x in enumerate(xs):
        if x > m:
            i = j
            m = x
    return i

for d in range(D):
    i = imax(S[d])
    print(i)


Fixed code:
D,*CS = map(int, open(0).read().split())
C = CS[:26]
S = [CS[26*i:26*(i+1)] for i in range(1, D+1)]

def imax(xs):
    m = -1
    i = 0
    for j, x in enumerate(xs):
        if x > m:
            i = j
            m = x
    return i

for d in range(D):
    i = imax(S[d])
    print(i + 1)
Buggy code:
D=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for i in range(D)]
t=[0 for i in range(D)]

print(s[1])

for day in range(D):
    t[day]=s[day].index(max(s[day]))+1

for ts in t:
    print(ts)

Fixed code:
D=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for i in range(D)]
t=[0 for i in range(D)]


for day in range(D):
    t[day]=s[day].index(max(s[day]))+1

for ts in t:
    print(ts)