Problem:
 Score : 200 points    Problem Statement Some number of chocolate pieces were prepared for a training camp.
The camp had N participants and lasted for D days.
The i -th participant ( 1 \leq i \leq N ) ate one chocolate piece on each of the following days in the camp: the 1 -st day, the (A_i + 1) -th day, the (2A_i + 1) -th day, and so on.
As a result, there were X chocolate pieces remaining at the end of the camp. During the camp, nobody except the participants ate chocolate pieces.  Find the number of chocolate pieces prepared at the beginning of the camp.      Constraints  1 \leq N \leq 100  1 \leq D \leq 100  1 \leq X \leq 100  1 \leq A_i \leq 100 ( 1 \leq i \leq N )  All input values are integers.         Input Input is given from Standard Input in the following format:  N  D  X  A_1  A_2  :  A_N       Output Find the number of chocolate pieces prepared at the beginning of the camp.        Sample Input 1 3
7 1
2
5
10      Sample Output 1 8  The camp has 3 participants and lasts for 7 days.
Each participant eats chocolate pieces as follows:   The first participant eats one chocolate piece on Day 1 , 3 , 5 and 7 , for a total of four.  The second participant eats one chocolate piece on Day 1 and 6 , for a total of two.  The third participant eats one chocolate piece only on Day 1 , for a total of one.   Since the number of pieces remaining at the end of the camp is one, the number of pieces prepared at the beginning of the camp is 1 + 4 + 2 + 1 = 8 .       Sample Input 2 2
8 20
1
10      Sample Output 2 29       Sample Input 3 5
30 44
26
18
81
18
6      Sample Output 3 56

Solution (Python):


import itertools
import collections
import bisect

def main():
    N = int(input())
    D, X = map(int, input().split())
    choco = 0
    for _ in range(N):
        a = int(input())
        choco += (D - 1) // a + 1
    print(choco + X)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
D,X = map(int,input().split())
for i in range(N):
    ai = int(input())
    x = (D-1)//ai
    X += x+1
print(X)

Solution (Python):
import sys
N = int(input())
D,X = [int(n) for n in input().split()]
A = [int(input()) for _ in range(N)]



ans = N
for d in range(2,D+1):
    for a in A:
        if(d % a==1 or a == 1):
            ans+=1
print(ans+X)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = []
for i in range(n):
	a.append(int(input()))
count = 0
for i in range(n):
	for j in range(1, d + 1, a[i]):
		count += 1
print(x + count)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    D, X = map(int, input().split())
    A = [int(input()) for _ in range(N)]

    c = 0
    for a in A:
        i = 0
        while (i * a) + 1 <= D:
            c += 1
            i += 1

    print(c + X)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
d,x=map(int,input().split())
for i in range(n):
    x+=1+((d-1)//int(input()))
print(x)

Solution (Python):
N = int(input())
D, X = map(int,input().split())
for i in range(N):
    X += (D - 1) // int(input())
print(N + X)

Solution (Python):
N=int(input())
D,X=(int(i) for i in input().split())
L=[]
for i in range(N):
  j=1
  a=int(input())
  
  while a*j+1<=D:
    j+=1
    
  L.append(j)

print(X+sum(L))

Solution (Python):

n = int(input())
d, x = [int(x) for x in input().split()]
res = 0
for _ in range(n):
    a = int(input())
    res += (1 + (d - 1) // a)
print(x + res)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]
res = x
for i in range(n):
    count = 0
    for j in range(1, d+1):
        if a[i] * count + 1 == j:
            count += 1
    res += count
print(res)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
num = X
for a in A:
    num += sum([1 for i in range(0, D + 1) if i * a + 1 <= D])
print(num)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]
eat = 0
for i in range(n):
    eat += 1 + (d-1)//a[i]
print(x+eat)

Solution (Python):
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))

N=ri()
D,X=rl()
A=[0]*N
ans = X
for i in range(N):
    ans += (D-1)//ri() + 1

print(ans)

Solution (Python):
def main():
    N = int(input())
    D, X = map(int, input().split())
    A = [int(input()) for _ in range(N)]
    ans = X
    for i in range(N):
        ans += D // A[i]
        if D % A[i] > 0:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
D, X = [int(n) for n in input().split()]
A = [int(input()) for _ in range(N)]

s = 0

for a in A:
    if a == 1:
        s += D // a
    else:
        s += sum([1 for d in list(range(1, D+1)) if d % a == 1])

print(s + X)

Solution (Python):
N = int(input())
D, X = [int(n) for n in input().split()]
A = [int(input()) for _ in range(N)]

s = 0

for a in A:
    if a == 1:
        s += D // a
    else:
        s += sum([1 for d in list(range(1, D+1)) if d % a == 1])

print(s + X)

Solution (Python):
N = input()
D, X = map(int, raw_input().split())

ans = X
for i in range(N):
  A = input()
  ans += 1 + (D-1)/A
print ans

Solution (Python):
n=int(input())
d,x=map(int,input().split())
A=[int(input()) for i in range(n)]

ans=x
for i in range(n):
    ans+=d//A[i]
    if d%A[i]>0 :
        ans+=1
    
print(ans)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
s=0
for i in range(n):
    w=0
    a=int(input())
    while d>=w*a+1:
        s+=1
        w+=1
print(s+x)

Solution (Python):

n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]
ans = n
for i in range(n):
    ans += (d-1) // a[i]
ans += x
print(ans)

Solution (Python):
N = int(input())
D, X = [int(x) for x in input().split()]

for i in range(1, N + 1):
  A = int(input())
  X += 1 + (D - 1) // A

print(X)

Solution (Python):
n,d,x,*a=map(int,open(0).read().split());print(sum(~-d//i+1for i in a)+x)

Solution (Python):
n,d,x,*a=map(int,open(0).read().split());print(sum(~-d//i+1for i in a)+x)

Solution (Python):
n,d,x,*a=map(int,open(0).read().split());print(sum(1+(d-1)//_ for _ in a)+x)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
s=0
for i in range(N):
    a=int(input())
    if D%a==0:
        s+=D//a
    else:
        s+=D//a+1
print(s+X)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
A=[]
for i in range(n):
    A.append(int(input()))
cnt=0
for j in range(n):
    cnt+=(d-1)//A[j]+1
print(x+cnt)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
cnt = 0
for i in range(n):
    a = int(input())
    j = 0
    while j*a+1 <= d:
        cnt += 1
        j += 1
print(cnt+x)

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


n = II()
d, x = LI()
A = [II() for _ in range(n)]

ans = x + n
for a in A:
    ans += (d - 1) // a
print(ans)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for i in range(N)]
tmp = [1 for i in range(N)]
res = X

for i in range(1, D+1):
    for j in range(N):
        if tmp[j] == i:
            res += 1
            tmp[j] += A[j]
    
print(res)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
player=[]
ate_num=[]
for i in range(N):
    player.append(int(input()))
for i in player:
    ate_num.append((D-1)//i+1)
print(sum(ate_num)+X)

Solution (Python):
n = int(input())

d, x = map(int, input().split())
a = []
for i in range(n):
    a.append(int(input()))

cnt = 0
for v in a:
    cnt = cnt + 1
    n = 1
    while True:
        if v * n + 1 <= d:
            cnt = cnt + 1
            n = n + 1
        else:
            break

print(cnt + x)

Solution (Python):
N = int(input())
D, X = map(int,input().split())
A = [int(input()) for _ in range(N)]
choco = X
for a in A: 
  d = 0
  x = 0
  while d*a+1 <= D:
    x += 1
    d += 1
  choco += x
print(choco)

Solution (Python):
n=int(input())
d,x = map(int,input().split())
aa = [int(input()) for _ in range(n)]
eats=[]
count=0
for a in aa:
    today=1
    while today<=d:
        count+=1
        today+=a
print(count+x)

Solution (Python):
int_n = int(input())
int_d, int_x = map(int, input().split())

count = 0

array_a = []
for a in range(int_n):
    array_a.append(int(input()))


for a in array_a:
    count += len(set([(a * d) + 1 for d in range(int_d)]) & set([d + 1 for d in range(int_d)]))

print(count + int_x)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
a = [int(input()) for i in range(n)]
ans = len(a)
i = 1
while True:
    k = 1
    for a_ in a:
        if i*a_+1<=d:
            ans += 1
            k = 0
    if k:
        break
    i+=1
print(ans+x)

Solution (Python):
def eat():
    i = 0

    while i * A + 1 <= D:
        i += 1

    return i


N = int(input())
D, X = map(int, input().split())

ans = 0

for i in range(N):
    A = int(input())
    ans += eat()

print(ans + X)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
cnt = 0
for i in range(n):
    tmp = int(input())
    cnt += (d-1)//tmp + 1
print(x+cnt)

Solution (Python):
n=int(input())
d,x=[int(i) for i in input().split()]
a=[]
for i in range(n):
    a.append(int(input()))
for j in range(n):
    for k in range(100):
        if a[j]*k+1<=d:
            x+=1
        else:
            break
print(x)

Solution (Python):
import numpy as np
n=int(input())
d,x = map(int,input().split())
a=np.zeros(n,dtype=np.int64)
for i in range(n):
    a[i]=int(input())
print(np.sum((d-1)//a)+n+x)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]
sum = x + n
for ai in a:
    sum += (d-1)//ai
print(sum)

Solution (Python):
def main():
    N = int(input())
    D, X = map(int, input().split())
    ans = X
    for i in range(N):
        A = int(input())
        for j in range(D):
            if j * A + 1 > D:
                break
            ans += 1
    print(ans)


main()

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]
ch = n + x
for i in range(n):
  ch += (d-1) // a[i]
print(ch)

Solution (Python):
from statistics import mean, median,variance,stdev
import sys
import math
import fractions

def j(q):
    if q==1: print("YES")
    else:print("NO")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

n = ip()                              
d,x= (int(i) for i in input().split())      








a =[]
for i in range(n):
    a.append(ip())
s = 0
for i in range(n):
    if d%a[i]:s+=d//a[i] + 1
    else: s+=(d//a[i])
print(s+x)

Solution (Python):
""" AtCoder """

N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]

ans = 0

for i in range(N):
    if D % A[i] > 0:
        ans += D // A[i] + 1
    else:
        ans += D // A[i]

print(ans + X)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
a = [int(input()) for i in range(n)]
ans = 0
for i in range(n):
    if d%a[i]!=0:
        ans += d//a[i]
    else:
        ans += d//a[i]-1
print(ans+n+x)

Solution (Python):
N = int(input())
D,X = map(int,input().split())
A = []
for n in range(N):
    A.append(int(input()))

sum = 0
for n in range(N):    
    sum += 1
    for d in range(1,D+1):
        result = A[n] * d + 1
        if result <= D:
            sum += 1

sum = X + sum

print(sum)

Solution (Python):
import math
n = int(input())
[d,x] = [int(i) for i in input().split()]
sum = x

for i in range(n):
  a = int(input())
  d1 = 1
  counter = 0
  while d1 <= d:
    d1 += a
    counter += 1
  sum += counter
print(sum)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
ans=x
for i in range(n):
  k=int(input())
  
  ans+=(d-1)//k+1
print(ans)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
a = [int(input()) for i in range(n)]
cnt = x
for i in range(n):
    cnt += ((d-1)//a[i])+1
print(cnt)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
A=list(map(int,[input() for _ in range(n)]))
ans=x
for i in range(n):
    c=1
    while c<=d:
        c+=A[i]
        ans+=1
print(ans)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in [0]*N]

ans = X + N
for i in range(N):
    ans += (D - 1) // A[i]
print(ans)

Solution (Python):
N = int(input())
D,X = map(int,input().split(" "))
list = []
for i in range(N):
    list.append(int(input()))

ans = 0
for i in range(N):
    for j in range(D):
        
        if j * list[i]+1 <= D:
            ans += 1
print(ans+X)

Solution (Python):

n = int(input())

d, x = map( int, input().split() )

choco = x
for i in range(n):
    ai = int( input() )

    choco +=  d // ai + 1 if d % ai != 0 else d// ai 

print(choco)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
l=[int(input()) for i in range(N)]
count=0
for i in range(N):
  for j in range(D):
    if(j*l[i]+1<=D):
      count+=1
    else:break
count+=X
print(count)

Solution (Python):
N = int(input())
D, X = map(int,input().split())
A = [int(input()) for _ in range(N)]
choco = X
for i in range(N):
  for j in range(D):
    if(j*A[i]+1 <= D):
      choco += 1
print(choco)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
for a in A:
    X += (D + a - 1) // a
print(X)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
a = [int(input()) for i in range(N)]
ans=0
for i in range(N):
    n=0
    while(1):
        if a[i]*n+1>D:
            break
        else:
            ans+=1
            n+=1
print(ans+X)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for i in range(n)]
ans=x
for i in range(n):
  ans+=int((d-1)/a[i])+1
print(ans)

Solution (Python):
n=int(input())
d,x=[int(u) for u in input().split()]
a=[]
for i in range(n):
  a.append(int(input()))

for i in range(n):
  m =  (d+a[i]-1)//a[i]
  
  x += m
print(x)

Solution (Python):
def main():
    n = int(input())
    d, x = map(int, input().split())
    a_ = []
    for _ in range(n):
        a_.append(int(input()))

    cnt = 0
    for a in a_:
        i = 1  
        while i <= d:
            i += a
            cnt += 1
    print(cnt + x)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n = int(input())
    d, x = map(int, input().split())
    a_ = []
    for _ in range(n):
        a_.append(int(input()))

    l = []
    for i in range(1, 101):
        for a in a_:
            r = (i - 1) * a + 1
            if r <= d:
                l.append(r)

    print(len(l) + x)


if __name__ == '__main__':
    main()

Solution (Python):
def ceil(i):
    if int(i) == i:
        return i
    else:
        return int(i)+1


N = int(input())
D, X = map(int, input().split())
L = []
ans = 0
for _ in range(N):
    x = int(input())
    ans += ceil(D / x)
print(int(ans+X))

Solution (Python):
N = int(input())
D, X = map(int, input().split())
As = [int(input()) for _ in range(N)]

print(X + sum([-(-D // A) for A in As]))

Solution (Python):
N = int(input())
D,X = map(int,input().split())
A = [int(input()) for _ in range(N)]

from math import ceil
ans = 0
for i in range(N):
    ans += ceil(D/A[i])

print(ans+X)

Solution (Python):
n = int(input())
d,x = map(int,input().split())

a = [int(input()) for i in range(n)]

ans = 0
for i in range(n):
    ans += (d-1)//a[i]+1

print(ans+x)

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


n = II()
d, x = LI()
A = [II() for _ in range(n)]

ans = x
for a in A:
    for i in range(101):
        if a * i + 1 <= d:
            ans += 1

print(ans)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
count = 0

for i in range(n):
    a = int(input())
    j = 0
    while d >= a * j + 1:
        count += 1
        j += 1
        
print(x + count)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
A=[int(input()) for _ in range(N)]
chocolate=X
for a in A:
    y=0
    i=0
    while True:
        y=i*a+1
        if y<=D:
            chocolate+=1
        else:
            break
        i+=1
print(chocolate)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
for i in range(n):
    a = int(input())
    x += (d+a-1)//a
print(x)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
s = 0
for i in range(n):
    a = int(input())
    for j in range(d):
        if a*j+1 <=d:
            s+=1
print(s+x)

Solution (Python):


def main():
    N = int(input())
    na = list(map(int, input().split()))
    D, X = na[0], na[1]
    A = []
    for i in range(N):
        A.append(int(input()))

    r = X
    for i in range(N):
        r += 1 + int((D - 1) / A[i])

    print(r)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
d, x = map(int, input().split())

c = 0
for _ in range(n):
    a = int(input())
    for _ in range(1, d + 1, a):
        c += 1

print(c + x)

Solution (Python):
N = int(input())
D, X = [int(x) for x in input().split()]

A = []
for i in range(N):
    A.append(int(input()))

sum = 0
for a in A:
    j = 0
    while j * a + 1 <= D:
        sum += 1
        j += 1
print(sum + X)

Solution (Python):
N = int(input())
D, X = map(int, str(input()).split())
A = []
for i in range(0, N):
    A.append(int(input()))
print(sum([(1 + (D - 1) // i) for i in A]) + X)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
A=[]
for i in range(N):
    A.append(int(input()))

ans=0

for i in range(N):
    d=1
    while d<=D:
        ans+=1
        d+=A[i]
print(ans+X)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]

eat = 0
for i in range(n):
    day = 1
    while day <= d:
        eat += 1
        day += a[i]

ans = eat + x
print(ans)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
ans = X
for i in range(N):
    count = 0
    while A[i] * count + 1 <= D:
        ans += 1
        count += 1
print(ans)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
for i in range(n):
    a=int(input())
    x+=(d+a-1)//a
print(x)

Solution (Python):
N = int(input())
D, X = map(int,input().split())
for i in range(N):
    A_i = int(input())
    count = 0
    while True:
        day = count*A_i + 1
        if day > D:
            break
        else:
            X += 1
            count += 1
print(X)

Solution (Python):
N = int(input())
D,X = map(int,input().split())
A = []
for i in range(N):
    A.append(int(input()))
count = 0
for j in range(N):
    count+=int((D-1)/A[j])+1
print(X+count)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = [0 for _ in range(N)]
c = 0
for i in range(N):
    A[i] = int(input())
    c += 1 + (D - 1) // A[i]
print(c + X)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
for i in range(N):
  a=int(input())
  X+=(D-1+a)//a
print(X)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for i in range(n)]
total=x
for j in a:
  total+=len(range(1,d+1,j))
print(total)

Solution (Python):
N = int(input())
D,X = map(int,input().split())
A = [int(input()) for i in range(N)]
a = []
for i in range(N):
    if D % A[i] == 0:
        a.append(D // A[i])
    else:
        a.append(D // A[i] + 1)

print(sum(a) + X)

Solution (Python):
N = int(input())
D, X = map(int,input().split())
A = [int(input()) for _ in range(N)]
cnt = 0
for a in A:
  for i in range(D):
    k = a * i + 1
    if(k <= D):
      cnt += 1
    else:
      break
print(cnt + X)

Solution (Python):
n = int(input())
d,x = map(int, input().split())
for i in range(n):
  a = (d-1) // int(input()) +1
  x += a
print(x)

Solution (Python):

import sys
input = sys.stdin.readline

N = int(input())
D, X = map(int, input().split())
eaten_choco = sum(1+(D-1)//int(input()) for _ in range(N))

print(eaten_choco + X)

Solution (Python):

import sys
input = sys.stdin.readline

N = int(input())
D, X = map(int, input().split())
lst_day = [day for day in range(1, D+1)]

eaten_choco = sum(len(lst_day[::int(input())]) for _ in range(N))
print(eaten_choco + X)

Solution (Python):

import sys
input = sys.stdin.readline

N = int(input())
D, X = map(int, input().split())
lst_day = [day for day in range(1, D+1)]

eaten_choco = 0
for _ in range(N):
    Ai = int(input())
    eaten_one_person = len(lst_day[::Ai])
    eaten_choco += eaten_one_person
print(eaten_choco + X)

Solution (Python):
N = int(input())
D,X = list(map(int,input().split()))
l = [int(input()) for i in range(N)]
cnt = 0
for i in range(N):
  cnt += (D-1)//l[i]
  
print(cnt+N+X)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
count = 0
for i in range(1, D+1):
    for j in range(N):
        if i % A[j] == 1 or A[j] == 1:
            count += 1
print(count + X)

Solution (Python):



def main():
    n = int(input())
    d, x = map(int, input().split())
    a = [int(input()) for _ in range(n)]
    choco = [1 for _ in range(100 + 1)]
    ans = x

    for i in range(n):
        ans += sum(choco[:d:a[i]])

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
d,x=map(int,input().split())
ans=n
for i in range(n):
    ans+=(d-1)//int(input())
print(ans+x)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
sum= N
for j in A:
    sum+=int((D-1)/j)
print(sum+X)

Solution (Python):



def main():
    """Function."""
    n = int(input())
    d, x = map(int, input().split())
    a = [int(input()) for _ in range(n)]

    x += n
    for i in range(1, d):
        for j in range(n):
            if i % a[j] == 0:
                x += 1
    print(x)


if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
d,x=(int(i) for i in input().split())
a=[int(input()) for i in range(n)]


def choco(a,d):
  cnt=0
  d=d-1
  while d >= 0:
    d=d-a
    cnt+=1
  return cnt

ans=x
for i in range(n):
  ans+=choco(a[i],d)

print(ans)

Solution (Python):

a = int(input())
b,c = map(int,input().split())
s = 0
for i in range(a):
    k = int(input())
    s +=1 +(b-1)//k
print(s+c)

Solution (Python):
N=int(input())
D,M=map(int,input().strip().split(" "))

Sum=0

for i in range(N):
    A=int(input())
    for j in range(D):
        
        if(A*j+1<=D):
            Sum+=1

print(Sum+M)

Solution (Python):
def main():
    n = int(input())
    d, x = map(int, input().split())
    aa = [int(input()) for _ in range(n)]
    res = x + sum(len(range(1, d + 1, a)) for a in aa)
    print(res)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
D,X = [int(i) for i in input().split()]
eaten_day = []
a_li = []
for i in range(N) :
    a_li.append(int(input()))

for i in range(N) :
    for d in range(1,D+1) :
        eat_day = (d-1) * a_li[i] + 1
        if (0 < eat_day and eat_day <= D) :
            eaten_day.append(eat_day)
print(len(eaten_day) + X)

Solution (Python):
def abc092_b():
    n = int(input())
    d, x = map(int, input().split())
    a = [int(input()) for _ in range(n)]
    choco = x
    for i in range(n):
        choco += (d - 1) // a[i] + 1

    print(choco)


abc092_b()

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = []
for k in range(n):
    a.append(int(input()))
ans = x
for i in range(n):
    j = 0
    while a[i]*j+1 <= d:
        ans +=1
        j +=1
print(ans)

Solution (Python):
n = int(input())
d,x = map(int,input().split())

ans = x
for _ in range(n):
    a = int(input())
    
    y = (d-1)//a
    ans += y+1

print(ans)

Solution (Python):
N = int(input())
D,X = list(map(int,input().split(" ")))
A = [int(input()) for i in range(N)]

ans = X
for i in range(N):
    r = int((D - 1)/A[i] + 1)
    ans+=r
print(ans)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
A = [int(input()) for _ in range(N)]
count=0
for i in range(1,D+1):
    for j in range(N): 
        if (i-1)%A[j]==0:
            count+=1
print(count+X)

Solution (Python):
n = int(input())
d,x = map(int, input().split())
a = []
for _ in range(n):
    a.append(int(input()))

res = 0
for e in a:
    i = 0
    while e*i+1 <= d:
        res += 1
        i += 1

print(res+x)

Solution (Python):
n = int(input())
d,x = map(int, input().split())
a = [int(input()) for _ in range(n)]

for i in range(n):
    day=1
    while day<=d:
        x += 1
        day += a[i]
print(x)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
s=0
for i in range(n):
  k=0
  a=int(input())
  c=0
  while True:
    y=k*a+1
    if y<=d:
      c+=1
      k+=1
    else:
      s+=c
      break
print(s+x)

Solution (Python):
i=input
I=int
n=I(i())
d,x=map(I,i().split())
print(sum((lambda m:(d+m-1)//m)(I(i())) for v in [0]*n)+x)

Solution (Python):
from math import *
i=input
I=int
n=I(i())
d,x=map(I,i().split())
print(sum(ceil(d/I(i()))for _ in range(n))+x)

Solution (Python):
from math import *
n=int(input())
d,x=map(int,input().split())
print(sum(ceil(d/int(input()))for _ in range(n))+x)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
m=0
for _ in range(n):
    M=int(input())
    m+=(d+M-1)//M
print(m+x)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
print(sum((lambda m:(d+m-1)//m)(int(input())) for v in range(n))+x)

Solution (Python):
import math
n=int(input())
d,x=map(int,input().split())
print(sum(math.ceil(d/int(input()))for v in range(n))+x)

Solution (Python):
n=input();d,x=map(int,input().split())
for i in range(int(n)):a=int(input());x+=(d+a-1)//a
print(x)

Solution (Python):
n=input()
d,x=map(int,input().split())
for i in range(int(n)):
 a=int(input())
 x+=(d+a-1)//a
print(x)

Solution (Python):
n=input()
d,x=map(int,input().split())
for i in range(int(n)):
    a=int(input())
    x+=(d+a-1)//a
print(x)

Solution (Python):
n=int(input());d,x=map(int,input().split());res=0
for i in range(n):
    a=int(input())
    res+=(d+a-1)//a
print(res+x)

Solution (Python):
n=int(input());d,x=map(int,input().split());res=0
for i in range(n):
    a=int(input())
    
    if a>d:
        
        res+=1
    else:
        
        if d%a!=0:
            res+=d//a+1
        else:
            res+=d//a
    
    
    
print(res+x)

Solution (Python):
N=int(input())
D,X=list(map(int,input().split()))
c=0
for i in range(N):
    A=int(input())
    if(D%A!=0):c+=1
    c+=int(D/A)
print(X+c)

Solution (Python):
a = int(input())
N,X = map(int,input().split(" "))
count = 0
for i in range(a):
    l = int(input())
    if N % l == 0:
        count += N // l
    else:
        count += N // l + 1
print(count + X)

Solution (Python):
N = int(input())
D,X = map(int, input().split())
A_list = [int(input()) for i in range(N)]
ans = X

for a in A_list:
    ans += int((D-1)/a + 1)

print(ans)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
chocho=0

for i in range(n):
  j=1
  chocho+=1
  A=int(input())
  tmp=j*A+1
  while tmp <= d:
    j+=1
    tmp=j*A+1
    chocho+=1
print(chocho+x)

Solution (Python):

n = int(input())
d, x = map(int, input().split())
for _ in range(n):
    x += ((d - 1) // int(input())) + 1
print(x)

Solution (Python):
a=int(input())
b,c=map(int,input().split())
d=[int(input()) for i in range(a)]

e=0
for k in range(a):
	for i in range(100):
		if i*d[k]+1<=b:
			e=e+1
print(e+c)

Solution (Python):

N = int(input())
D, ans = map(int, input().split())

for i in range(0,N):
    A = int(input())
    ans += int((D-1)/A)+1

print(ans)

Solution (Python):
n = int(input())
d, x = map(int, input().split())

a = list()
for i in range(n):
    a.append(int(input()))

ans = x

for i in range(1, d + 1):
    for j in range(n):
        if((i - 1) % a[j] == 0):
            ans += 1

print(ans)

Solution (Python):
def main():
    n = int(input())
    d, x = map(int, input().split())

    for i in range(n):
        a = int(input())
        x += (d-1)//a + 1

    print(x)

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
dx = list(map(int, input().split()))
d = dx[0]
x = dx[1]
for i in range(n):
    k = 0
    a = int(input())
    while a * k + 1 <= d:
        x += 1
        k += 1
print(x)

Solution (Python):
N = int(input())
D, X = map( int, input().split())
A = list()
chocoX = 0

for i in range(N):
  a = input()
  A.append(a)
    
for j in range(N):
  chocoX += (((D -1) // int(A[j])) + 1)
    
print(chocoX + X)

Solution (Python):
N = int(input())
D, X = [int(_) for _ in input().split()]
A = [int(input()) for _ in range(N)]

for a in A:
    X += 1 + (D - 1) // a
print(X)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
eaten_amount = 0

for i in range(N):
    a_n = int(input())
    j = 0
    while a_n * j + 1 <= D:
        eaten_amount += 1
        j += 1

print(X + eaten_amount)

Solution (Python):
n = int(input())
d, x = map(int,input().split())
a = [input() for i in range(n)]
b = [int(i) for i in a]
eat = []
for i in range(n):
  eat.append((d-1)//b[i] + 1)
print(sum(eat) + x)

Solution (Python):
n = int(input())
d, x = map(int,input().split())
a = [int(input()) for _ in range(n)]
s = 0
for v in a:
    s += (d - 1) // v + 1
print(s + x)

Solution (Python):
N = input()
D, X = map(int, raw_input().split())
A = [input() for i in range(N)]
print sum([(D - 1) / a + 1 for a in A]) + X

Solution (Python):
n = int(input())
d,x = map(int,input().split())
a = [int(input()) for _ in range(n)]
for i in a:
    for j in range(1,d+1):
        if (j-1)%i==0:
            x += 1
print(x)

Solution (Python):
n = int(input())
d,x =map(int,input().split())
cnt = 0
for i in range(n):
    cnt += 1+(d-1)//int(input())
print(cnt+x)

Solution (Python):
a=int(input())
b,c=map(int,input().split())
print(sum((b-1)//int(input())for i in[a]*a)+a+c)

Solution (Python):
a=int(input())
b,c=map(int,input().split())
d=list((b-1)//int(input())for i in range(a))
print(a+c+sum(d))

Solution (Python):
n=int(input())
d,x=map(int,input().split())
x+=n
d-=1
for i in range(n):
  a=int(input())
  x+=d//a
print(x)

Solution (Python):
N = int(input())
D, X = map(int, input().split())

for i in range(N):
    A = int(input())
    X += 1 + (D - 1) // A

print(X)

Solution (Python):
n = int(input())
d,x = map(int, input().split())
a = [int(input()) for i in range(n)]
co = 0
for i in range(1, d + 1):
  for j in a:
    for k in range(d + 1):
      if i ==  k * j + 1:
        co += 1
co += x
print(co)

Solution (Python):
n = int(input())
d, x = [int(i) for i in input().split()]
a = [int(input()) for i in range(n)]
c = 0
for i in range(d):
  for j in range(n):
    if i*a[j]+1 <= d:
      c += 1
print(c+x)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
ans=X

for i in range(N):
  a=int(input())
  ans+=1
  if D>1:
    ans+=((D-1)//a)
print(ans)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
ans=X

for i in range(N):
  a=int(input())
  ans+=1
  if D>1:
    ans+=((D-1)//a)
print(ans)

Solution (Python):
import math
n = int(input())
d,x = map(int,input().split())
lis = [int(input()) for i in range(n)]
cou = x
for i in range(n):cou += math.ceil(d/lis[i])
print(cou)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]

ans = x
for i in range(n):
    count = 1
    day = 1
    while day + a[i] <= d:
        day += a[i]
        count += 1
    ans += count

print(ans)