Buggy python submission (verdict: Time Limit Exceeded):
import itertools, operator
def combinations_with_replacement_counts(n, r):
    size = n + r - 1
    for indices in itertools.combinations(range(size), n-1):
        starts = [0] + [index+1 for index in indices]
        stops = indices + (size,)
        yield tuple(map(operator.sub, stops, starts))

a = input().split(' ')
d = int(a[0])
g = int(a[1])
p = []
c = []
for i in range(d):
	a = input().split(' ')
	p.append(int(a[0]))
	c.append(int(a[1]))

end = False

for i in range(1, 1001):
	if (g <= i*d*100 + sum(c)):
		for j in list(combinations_with_replacement_counts(d, i)):			
			score = 0
			go = True
			for l in range(len(j)):
				if j[l] > p[l]:
					go = False
					break
			if go == True:
				for l in range(len(j)):
					score += j[l] * 100 * (l + 1) + j[l]//p[l]*c[l]
				if score >= g:
					print (i)
					exit()
	

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

from itertools import product
from math import ceil
 
ans = 1e09
 
for c in product([0,1],repeat=d):
    score = 0
    num = 0
    ind = 0
    for i in range(d):
        if c[i] == 1:
            score += p[i][0]*100*(i+1) + p[i][1]
            num += p[i][0]
        else:
            ind = max(i,ind)
    
    if g - score <= 0:
        ans = min(ans,num)
    elif g - score <= (p[ind][0]-1)*100*(ind+1):
        num += ceil((g-score)/(100*(ind+1)))
        ans = min(ans,num)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools, operator
def combinations_with_replacement_counts(n, r):
    size = n + r - 1
    for indices in itertools.combinations(range(size), n-1):
        starts = [0] + [index+1 for index in indices]
        stops = indices + (size,)
        yield tuple(map(operator.sub, stops, starts))

a = input().split(' ')
d = int(a[0])
g = int(a[1])
p = []
c = []
for i in range(d):
	a = input().split(' ')
	p.append(int(a[0]))
	c.append(int(a[1]))

end = False

for i in range(1, 1001):
	for j in list(combinations_with_replacement_counts(d, i)):
		if (g > i*d*100 + sum(c)):
			break
			
		score = 0
		go = True
		for l in range(len(j)):
			if j[l] > p[l]:
				go = False
				break
		if go == True:
			for l in range(len(j)):
				score += j[l] * 100 * (l + 1) + j[l]//p[l]*c[l]
			if score >= g:
				print (i)
				exit()
	

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

from itertools import product
from math import ceil
 
ans = 1e09
 
for c in product([0,1],repeat=d):
    score = 0
    num = 0
    ind = 0
    for i in range(d):
        if c[i] == 1:
            score += p[i][0]*100*(i+1) + p[i][1]
            num += p[i][0]
        else:
            ind = max(i,ind)
    
    if g - score <= 0:
        ans = min(ans,num)
    elif g - score <= (p[ind][0]-1)*100*(ind+1):
        num += ceil((g-score)/(100*(ind+1)))
        ans = min(ans,num)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools, operator
def combinations_with_replacement_counts(n, r):
    size = n + r - 1
    for indices in itertools.combinations(range(size), n-1):
        starts = [0] + [index+1 for index in indices]
        stops = indices + (size,)
        yield tuple(map(operator.sub, stops, starts))

a = input().split(' ')
d = int(a[0])
g = int(a[1])
p = []
c = []
for i in range(d):
	a = input().split(' ')
	p.append(int(a[0]))
	c.append(int(a[1]))

end = False

for i in range(1, 1001):
	for j in list(combinations_with_replacement_counts(d, i)):
		score = 0
		go = True
		for l in range(len(j)):
			if j[l] > p[l]:
				go = False
				break
		if go == True:
			for l in range(len(j)):
				score += j[l] * 100 * (l + 1) + j[l]//p[l]*c[l]
			if score >= g:
				print (i)
				exit()
	

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

from itertools import product
from math import ceil
 
ans = 1e09
 
for c in product([0,1],repeat=d):
    score = 0
    num = 0
    ind = 0
    for i in range(d):
        if c[i] == 1:
            score += p[i][0]*100*(i+1) + p[i][1]
            num += p[i][0]
        else:
            ind = max(i,ind)
    
    if g - score <= 0:
        ans = min(ans,num)
    elif g - score <= (p[ind][0]-1)*100*(ind+1):
        num += ceil((g-score)/(100*(ind+1)))
        ans = min(ans,num)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools, operator
def combinations_with_replacement_counts(n, r):
    size = n + r - 1
    for indices in itertools.combinations(range(size), n-1):
        starts = [0] + [index+1 for index in indices]
        stops = indices + (size,)
        yield tuple(map(operator.sub, stops, starts))

a = input().split(' ')
d = int(a[0])
g = int(a[1])
p = []
c = []
for i in range(d):
	a = input().split(' ')
	p.append(int(a[0]))
	c.append(int(a[1]))

end = False

for i in range(1, 1001):
	for j in list(combinations_with_replacement_counts(d, i)):
		score = 0
		go = True
		for l in range(len(j)):
			if j[l] > p[l]:
				go = False
				break
		if go == True:
			for l in range(len(j)):
				score += j[l] * 100 * (l + 1) + j[l]//p[l]*c[l]
			if score >= g:
				print (i)
				exit()
	

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

from itertools import product
from math import ceil
 
ans = 1e09
 
for c in product([0,1],repeat=d):
    score = 0
    num = 0
    ind = 0
    for i in range(d):
        if c[i] == 1:
            score += p[i][0]*100*(i+1) + p[i][1]
            num += p[i][0]
        else:
            ind = max(i,ind)
    
    if g - score <= 0:
        ans = min(ans,num)
    elif g - score <= (p[ind][0]-1)*100*(ind+1):
        num += ceil((g-score)/(100*(ind+1)))
        ans = min(ans,num)
print(ans)