Buggy python submission (verdict: Time Limit Exceeded):
d,g=map(int,input().split())
g=g//100
pc=[list(map(int,input().split())) for i in range(d)]
P=0
C=0#合計
for i in range(d):
    pc[i][1]=pc[i][1]//100
    C=(C+pc[i][1]+pc[i][0]*(i+1))
    P+=pc[i][0]
dp=[10000000]*(C+1)
for i in range(d):
    dp_sub=[10000000]*(C+1)
    for j in range(C+1):
        if j==0:
            for k in range(1,pc[i][0]+1):
                if k!=pc[i][0]:
                    dp_sub[k*(i+1)]=k
                else:
                    dp_sub[k*(i+1)+pc[i][1]]=k
        elif dp[j]!=10000000:
            for k in range(1,pc[i][0]+1):
                if k!=pc[i][0]:
                    dp_sub[j+k*(i+1)]=min(dp[j]+k,dp_sub[j+k*(i+1)])
                else:
                    dp_sub[j+k*(i+1)+pc[i][1]]=min(dp[j]+k,dp_sub[j+k*(i+1)+pc[i][1]])

    for j in range(C+1):
        if dp_sub[j]!=0:
            dp[j]=min(dp[j],dp_sub[j])
m=P
for i in range(g,C+1):
    if dp[i]!=0:
        m=min(m,dp[i])
print(m)


Fixed submission:
import math
d,g=map(int,input().split())
pc=[list(map(int,input().split())) for i in range(d)]
ans=10000000000000000000
for i in range(1<<d):
    s=0
    ans_=0
    for j in range(d):
        if (i>>j)&1:
            s+=(pc[j][1]+pc[j][0]*100*(j+1))
            ans_+=pc[j][0]
    #print(s,ans_)
    if s>=g:
        ans=min(ans,ans_)
    else:
        for j in range(d-1,-1,-1):
            if not((i>>j)&1):
                if s+(pc[j][0]*100*(j+1))>=g:
                    h=-((s-g)//(100*(j+1)))
                    s+=(h*100*(j+1))
                    ans_+=h
                    ans=min(ans,ans_)
                    break
                else:
                    break
print(ans)
#ansとans_
#謎のWA

Buggy python submission (verdict: Runtime Error):
#include<iostream>
#include<vector>
#include<cmath>
#include<queue>
#include<utility>
#include<algorithm>

using namespace std;

int main(){
  int d,g;cin >> d >> g;
  g=int(g/100);
  vector< pair<int,int> > pc(d);
  int P=0;int C=0;
  for(int i=0;i<d;i++){
    int p,c;cin >> p >> c;c=int(c/100);
    pc[i]=make_pair(p,c);
    C+=(c+p*(i+1));P+=p;
  }
  vector<int> dp(C+1,0);
  for(int i=0;i<d;i++){
    vector<int> dp_sub(C+1,0);
    for(int j=0;j<C+1;j++){
      if(j==0){
        for(int k=1;k<pc[i].first+1;k++){
          if(k!=pc[i].first){dp_sub[k*(i+1)]=k;}
          else{dp_sub[k*(i+1)+pc[i].second]=k;}
        }
      }else if(dp[j]!=0){
        for(int k=1;k<pc[i].first+1;k++){
          if(k!=pc[i].first){
            if(dp_sub[j+k*(i+1)]!=0){
              dp_sub[j+k*(i+1)]=min(dp[j]+k,dp_sub[j+k*(i+1)]);
            }else{
              dp_sub[j+k*(i+1)]=dp[j]+k;
            }
          }else{
            if(dp_sub[j+k*(i+1)+pc[i].second]!=0){
              dp_sub[j+k*(i+1)+pc[i].second]=min(dp[j]+k,dp_sub[j+k*(i+1)+pc[i].second]);
            }else{
              dp_sub[j+k*(i+1)+pc[i].second]=dp[j]+k;
            }
          }
        }
      }
    }
    for(int j=0;j<C+1;j++){
      if(dp_sub[j]!=0){
        if(dp[j]==0){
          dp[j]=dp_sub[j];
        }else{
          dp[j]=min(dp[j],dp_sub[j]);
        }
      }
    }
  }
  int m=P;
  for(int i=g;i<C+1;i++){
    if(dp[i]!=0){m=min(m,dp[i]);}
  }
  cout << m << endl;
}


Fixed submission:
import math
d,g=map(int,input().split())
pc=[list(map(int,input().split())) for i in range(d)]
ans=10000000000000000000
for i in range(1<<d):
    s=0
    ans_=0
    for j in range(d):
        if (i>>j)&1:
            s+=(pc[j][1]+pc[j][0]*100*(j+1))
            ans_+=pc[j][0]
    #print(s,ans_)
    if s>=g:
        ans=min(ans,ans_)
    else:
        for j in range(d-1,-1,-1):
            if not((i>>j)&1):
                if s+(pc[j][0]*100*(j+1))>=g:
                    h=-((s-g)//(100*(j+1)))
                    s+=(h*100*(j+1))
                    ans_+=h
                    ans=min(ans,ans_)
                    break
                else:
                    break
print(ans)
#ansとans_
#謎のWA

Buggy python submission (verdict: Time Limit Exceeded):
d,g=map(int,input().split())
g=g//100
pc=[list(map(int,input().split())) for i in range(d)]
P=0
C=0#合計
for i in range(d):
    pc[i][1]=pc[i][1]//100
    C=(C+pc[i][1]+pc[i][0]*(i+1))
    P+=pc[i][0]
dp=[0]*(C+1)
#print(C)
for i in range(d):
    dp_sub=[0]*(C+1)
    for j in range(C+1):
        if j==0:
            for k in range(1,pc[i][0]+1):
                if k!=pc[i][0]:
                    dp_sub[k*(i+1)]=k
                else:
                    dp_sub[k*(i+1)+pc[i][1]]=k
        elif dp[j]!=0:
            for k in range(1,pc[i][0]+1):
                if k!=pc[i][0]:
                    if dp_sub[j+k*(i+1)]!=0:
                        dp_sub[j+k*(i+1)]=min(dp[j]+k,dp_sub[j+k*(i+1)])
                    else:
                        dp_sub[j+k*(i+1)]=dp[j]+k
                else:
                    #print(j+k*(i+1)+pc[i][1])
                    if dp_sub[j+k*(i+1)+pc[i][1]]!=0:
                        dp_sub[j+k*(i+1)+pc[i][1]]=min(dp[j]+k,dp_sub[j+k*(i+1)+pc[i][1]])
                    else:
                        dp_sub[j+k*(i+1)+pc[i][1]]=dp[j]+k
    #print(dp_sub)
    for j in range(C+1):
        if dp_sub[j]!=0:
            if dp[j]==0:
                dp[j]=dp_sub[j]
            else:
                dp[j]=min(dp[j],dp_sub[j])
m=P
for i in range(g,C+1):
    if dp[i]!=0:
        m=min(m,dp[i])
print(m)
#print(dp)


Fixed submission:
import math
d,g=map(int,input().split())
pc=[list(map(int,input().split())) for i in range(d)]
ans=10000000000000000000
for i in range(1<<d):
    s=0
    ans_=0
    for j in range(d):
        if (i>>j)&1:
            s+=(pc[j][1]+pc[j][0]*100*(j+1))
            ans_+=pc[j][0]
    #print(s,ans_)
    if s>=g:
        ans=min(ans,ans_)
    else:
        for j in range(d-1,-1,-1):
            if not((i>>j)&1):
                if s+(pc[j][0]*100*(j+1))>=g:
                    h=-((s-g)//(100*(j+1)))
                    s+=(h*100*(j+1))
                    ans_+=h
                    ans=min(ans,ans_)
                    break
                else:
                    break
print(ans)
#ansとans_
#謎のWA