Buggy python submission (verdict: Time Limit Exceeded):
d,g = map(int,input().split())
li = [list(map(int,input().split())) for i in range(d)]

for i in range(d):
  li[i].append(li[i][0]*100*(i+1) + li[i][1])
tmp = 10 ** 9
def func(x,lis,cnt):
  global tmp
  if x <= 0:
    return cnt
  else:
    for i in range(d):
      if i not in lis:
        if x <= 100*(i+1)*(li[i][0]-1):
          tmp = min(tmp,cnt + (x-1)//(100*(i+1)) + 1)
          #print("{} {} {}".format(i,lis,tmp))
        elif x <= li[i][2]:
          tmp = min(tmp,cnt + li[i][0])
          #print("{} {} {}".format(i,lis,tmp))
        else:
          tmp = min(tmp,func(x-li[i][2],lis+[i],cnt+li[i][0]))
          #print("{} {} {}".format(i,lis,tmp))
    return tmp
print(func(g,[],0))

Fixed submission:
d,g = map(int,input().split())
li = [list(map(int,input().split())) for i in range(d)]

ans = 10 ** 9
for i in range(2**d):
  ch = bin(i)[2:]
  ch = ch.zfill(d)
  tmpsum = 0
  cnt = 0
  for j in range(d):
    if ch[j] == "1":
      tmpsum += li[j][0]*100*(j+1) + li[j][1]
      cnt += li[j][0]
  if tmpsum >= g:
    ans = min(ans,cnt)
    #print("{} {}".format(bin(i),cnt))
  else:
    ind = ch.rfind("0")
    if tmpsum + (li[ind][0]-1)*100*(ind+1) >= g:
      ans = min(ans,cnt+(g-tmpsum-1)//(100*(ind+1))+1)
      #print("{} {} {}".format(bin(i),cnt,ans))
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
d,g = map(int,input().split())
li = [list(map(int,input().split())) for i in range(d)]

for i in range(d):
  li[i].append(li[i][0]*100*(i+1) + li[i][1])
tmp = 10 ** 9
def func(x,lis,cnt):
  global tmp
  if x <= 0:
    return cnt
  else:
    for i in range(d):
      if i in lis:
        continue
      else:
        if x <= 100*(i+1)*(li[i][0]-1):
          tmp = min(tmp,cnt + (x-1)//(100*(i+1)) + 1)
          #print("{} {} {}".format(i,lis,tmp))
        elif x <= li[i][2]:
          tmp = min(tmp,cnt + li[i][0])
          #print("{} {} {}".format(i,lis,tmp))
        else:
          tmp = min(tmp,func(x-li[i][2],lis+[i],cnt+li[i][0]))
          #print("{} {} {}".format(i,lis,tmp))
    return tmp
print(func(g,[],0))

Fixed submission:
d,g = map(int,input().split())
li = [list(map(int,input().split())) for i in range(d)]

ans = 10 ** 9
for i in range(2**d):
  ch = bin(i)[2:]
  ch = ch.zfill(d)
  tmpsum = 0
  cnt = 0
  for j in range(d):
    if ch[j] == "1":
      tmpsum += li[j][0]*100*(j+1) + li[j][1]
      cnt += li[j][0]
  if tmpsum >= g:
    ans = min(ans,cnt)
    #print("{} {}".format(bin(i),cnt))
  else:
    ind = ch.rfind("0")
    if tmpsum + (li[ind][0]-1)*100*(ind+1) >= g:
      ans = min(ans,cnt+(g-tmpsum-1)//(100*(ind+1))+1)
      #print("{} {} {}".format(bin(i),cnt,ans))
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
d,g = map(int,input().split())
li = [list(map(int,input().split())) for i in range(d)]

for i in range(d):
  li[i].append(li[i][0]*100*(i+1) + li[i][1])
tmp = 10 ** 9
def func(x,lis,cnt):
  global tmp
  if x <= 0:
    return cnt
  else:
    for i in range(d):
      if i in lis:
        continue
      else:
        if x <= 100*(i+1)*(li[i][0]-1):
          tmp = min(tmp,cnt + (x-1)//(100*(i+1)) + 1)
          #print("{} {} {}".format(i,lis,tmp))
        elif x <= li[i][2]:
          tmp = min(tmp,cnt + li[i][0])
          #print("{} {} {}".format(i,lis,tmp))
        else:
          tmp = min(tmp,func(x-li[i][2],lis+[i],cnt+li[i][0]))
          #print("{} {} {}".format(i,lis,tmp))
    return tmp
print(func(g,[],0))

Fixed submission:
d,g = map(int,input().split())
li = [list(map(int,input().split())) for i in range(d)]

ans = 10 ** 9
for i in range(2**d):
  ch = bin(i)[2:]
  ch = ch.zfill(d)
  tmpsum = 0
  cnt = 0
  for j in range(d):
    if ch[j] == "1":
      tmpsum += li[j][0]*100*(j+1) + li[j][1]
      cnt += li[j][0]
  if tmpsum >= g:
    ans = min(ans,cnt)
    #print("{} {}".format(bin(i),cnt))
  else:
    ind = ch.rfind("0")
    if tmpsum + (li[ind][0]-1)*100*(ind+1) >= g:
      ans = min(ans,cnt+(g-tmpsum-1)//(100*(ind+1))+1)
      #print("{} {} {}".format(bin(i),cnt,ans))
print(ans)