Buggy python submission (verdict: Time Limit Exceeded):
from itertools import permutations

d, g = map(int, input().split())
g //= 100
pcs = []
for i in range(d):
    p, c = map(int, input().split())
    c //= 100
    pcs.append((p, c, (i + 1) * p, (i + 1) * p + c))

ans = float('inf')
caches = []
for perm in permutations(range(d)):
    flag = False
    for cache in caches:
        if perm[:len(cache)] == cache:
            flag = True
    if flag:
        continue
    h = g
    tmp = 0
    cache = []
    for i in perm:
        cache.append(i)
        p, c, a, b = pcs[i]
        if h <= a:
            q = (h - 1) // (i + 1) + 1
            tmp += q
            break
        tmp += p
        h -= b
        if h <= 0:
            break
        if tmp >= ans:
            break
    ans = min(ans, tmp)
    caches.append(cache)
print(ans)


Fixed submission:
import bisect
from operator import itemgetter

d, g = map(int, input().split())
g //= 100
problem_quantities = []
complete_scores = []
for i in range(1, d + 1):
    p, c = map(int, input().split())
    c //= 100
    problem_quantities.append(p)
    complete_scores.append(i * p + c)

curr_idx = d
curr_bit = 0
curr_cmp, curr_qtt = 0, 0
complete_combinations = [None] * (1 << d)
complete_combinations[0] = (0, 0, 0)
for use in range(1, 1 << d):
    if use & curr_bit == 0:
        curr_idx -= 1
        curr_bit = use
        curr_cmp = complete_scores[curr_idx]
        curr_qtt = problem_quantities[curr_idx]
    ps, pq, _ = complete_combinations[use ^ curr_bit]
    complete_combinations[use] = (ps + curr_cmp, pq + curr_qtt, use)

complete_combinations.sort()

bi = bisect.bisect(complete_combinations, (g,))

ans = float('inf')
for s, p, use in complete_combinations[:bi]:
    i = d
    while use & 1:
        i -= 1
        use >>= 1
    cmp = complete_scores[i - 1]
    remain = g - s
    if remain >= cmp:
        continue
    q = min(problem_quantities[i - 1], (remain - 1) // i + 1)
    ans = min(ans, p + q)

ans = min(ans, min(map(itemgetter(1), complete_combinations[bi:])))
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict

d, g = map(int, input().split())
dp = defaultdict(lambda: float('inf'))
dp[0] = 0
for i in range(d):
    p, c = map(int, input().split())
    solo_score = (i + 1) * 100
    ndp = dp.copy()
    for s, q in dp.items():
        if s == g:
            continue
        for j in range(1, p):
            k = min(g, s + solo_score * j)
            ndp[k] = min(ndp[k], q + j)
        k = min(g, s + solo_score * p + c)
        ndp[k] = min(ndp[k], q + p)
    dp = ndp
print(dp[g])


Fixed submission:
import bisect
from operator import itemgetter

d, g = map(int, input().split())
g //= 100
problem_quantities = []
complete_scores = []
for i in range(1, d + 1):
    p, c = map(int, input().split())
    c //= 100
    problem_quantities.append(p)
    complete_scores.append(i * p + c)

curr_idx = d
curr_bit = 0
curr_cmp, curr_qtt = 0, 0
complete_combinations = [None] * (1 << d)
complete_combinations[0] = (0, 0, 0)
for use in range(1, 1 << d):
    if use & curr_bit == 0:
        curr_idx -= 1
        curr_bit = use
        curr_cmp = complete_scores[curr_idx]
        curr_qtt = problem_quantities[curr_idx]
    ps, pq, _ = complete_combinations[use ^ curr_bit]
    complete_combinations[use] = (ps + curr_cmp, pq + curr_qtt, use)

complete_combinations.sort()

bi = bisect.bisect(complete_combinations, (g,))

ans = float('inf')
for s, p, use in complete_combinations[:bi]:
    i = d
    while use & 1:
        i -= 1
        use >>= 1
    cmp = complete_scores[i - 1]
    remain = g - s
    if remain >= cmp:
        continue
    q = min(problem_quantities[i - 1], (remain - 1) // i + 1)
    ans = min(ans, p + q)

ans = min(ans, min(map(itemgetter(1), complete_combinations[bi:])))
print(ans)