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):
n = int(input())
d, x = map(int, input().split())
l = [int(input()) for _ in range(n)]
sum = 0
for i in range(n):
    day_i = 1
    while (day_i <= d):
        sum += 1
        day_i += l[i]
print(sum + x)

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

Solution (Python):
N=int(input())
Day,x=map(int,input().split())
baisu=[int(input()) for _ in range(N)]
total=x
k=0

for j in range(N):
  k=0
  while k*baisu[j]+1<=Day:
    total+=1
    k+=1
    
print(total)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
A = [int(input()) for _ in range(n)]
ans = 0
for i in range(n):
  cnt = 0
  for j in range(d):
    if A[i] * j + 1 <= d:
      ans += 1
    else:
      break
print(ans + x)

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

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

print(res)

Solution (Python):
N=int(input())
days,last=[int(s) for s in input().split()]
for i in range(N):
  x=1
  a=int(input())
  while x<=days:
    last+=1
    x+=a
print(last)

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

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

print(sum(mod) + x)

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

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

cnt = 0

for i in range(n):
    for j in range(101):
        if 1 + j * ls_a[i] <= d:
            cnt += 1
        else:
            break

print(cnt + x)

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

ans = x
for n in range(n):
    ans += -(-d//A[n])

print(ans)

Solution (Python):
N=int(input())
DX=list(map(int,input().split()))
D=DX[0]
X=DX[1]
A = [int(input()) for i in range(N)]
cnt=0
for j in range(len(A)):
    for k in range(D):
        if 1+A[j]*k>D:
            break;
        cnt=cnt+1

print(X+cnt)

Solution (Python):
n = int(input())
d,x = map(int,input().split())
ans = x
for i in range(n):
    a = int(input())
    count = 0
    for i in range(100):
        if i * a + 1 <= d:
            count += 1
        else:
            break
    ans += count
print(ans)

Solution (Python):

import sys
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

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

choco = x

for i in range(n):
	j = 0
	while a[i]*j+1 <= d:
		
		j = j + 1
		choco = choco + 1

print(choco)

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


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

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

chocolate = list()

for i in range(N):
	
	choco_count = 0
	for j in range(1,D+1):
		day_count = 1 + A[i]*(j-1) 
		if day_count <= D:
			choco_count += 1 
		else:
			break
	
	chocolate.append(choco_count)
print(sum(chocolate)+X)

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

count = 0
for n in range(N):
    participant = int(input())
    count += len(list(range(0, d, participant)))

print(count+x)

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

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

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

Solution (Python):


N=int(input())
D,X=list(map(int,input().split(" ")))
c=0 


for _ in range(N):
    c+=(1+(D-1)//int(input())) 

print(X+c)

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

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

ans = 0

for j in A:
    for k in range(0,100):
        if k * j +1 <=  D:
            ans +=1
print(ans + X)

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

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

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

Solution (Python):
n = int(input())
d, x = map(int, input().split())
ans = x
for i in range(n):
  a = int(input())
  ans -= -d//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 += -(-d//a)
print(ans)

Solution (Python):
def examB():
    N = I()
    D, X = LI()
    A = [I() for _ in range(N)]
    cur = X
    for i in A:
        cur += (D-1)//i + 1
    print(cur)

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

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

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

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

Solution (Python):
N = int(input())
D, X = list(map(int, input().split()))
for _ in range(N):
    X += (D-1)//int(input())+1
print(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(D):
    for j in range(N):
        if i % A[j] == 0:
            eat += 1

print(eat + X)

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

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

ans = X

for a in A:
    for d in range(1, D+1, a):
        ans += 1

print(ans)

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

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

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

Solution (Python):
from sys import stdin
import numpy as np
import math

n = int(stdin.readline().rstrip())

d,x = [int(x) for x in stdin.readline().rstrip().split()]

li = [int(stdin.readline().rstrip()) for _ in range(n)]

point = 0
for i in range(n):
    if li[i] <= d:
        point += math.ceil(d/li[i])
    else:
        point += 1
point += x
print(point)

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

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    d,x=map(int,input().split())
    A=[int(input()) for _ in range(n)]
    ans=x
    for a in A:
        ans+=(d-1)//a+1
    print(ans)
resolve()

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

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

Solution (Python):
import math
n = int(input())
d,x = [int(i) for i in input().split()]
ans = 0
for _ in range(n):
    ans += (1 + ((d-1)//int(input())))

print(x + ans)

Solution (Python):

n = int(input())
d, x = [int(s) for s in input().split()]
a = [int(input()) for _ in range(n)]

chocorates = 0

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

print(chocorates + x)

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


def f(a, D):
    i = 0
    while i * a + 1 <= D:
        i += 1
    return i


consumed = 0
for a in A:
    consumed += f(a, D)
print(X + consumed)

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

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

Solution (Python):
number=int(input())
day,re=map(int,input().split())
a=[int(input()) for i in range(number)]
for i in a:
    for j in range(101):
        if j*i+1<=day:
            re+=1
print(re)

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

ans = 0

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

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

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

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

print(total)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n=int(input())
    d,x=map(int,input().split())
    aa=[]
    for _ in range(n):
        aa.append(int(input()))
    print(x + sum((d-1)//a + 1 for a in aa))

main()

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

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

print(ans)

Solution (Python):

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

c_count=0
for i in a:
    day=1+(d-1)//i
    c_count+=day
print(c_count+x)

Solution (Python):
n=int(input())
b,c=map(int,input().split())
a=[]
ans=0
for i in range(n):
    a.append(int(input()))
for k in range(n):
    for j in range(1000):
        if 1+a[k]*j<=b:
            ans+=1
        else:
            break
print(ans+c)

Solution (Python):
n=int(input())
d,x = map(int,input().split())
for _ in range(n):
  a=int(input())
  date =1
  while date <=d:
    x+=1
    date += a
print(x)

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

for _ in range(n):
    a = int(input())
    for i in range(100):
        if a*i+1 <= d:
            cnt += 1
        else:
            break

print(cnt+x)

Solution (Python):
n = int(input())
d, x = map(int,input().split())
ans = x
def calc_eat(a):
    cnt = 0
    while True:
        if cnt*a+1 <= d:
            cnt += 1
        else:
            return cnt
for _ in range(n):
    a = int(input())
    ans += calc_eat(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 a:
    day = 1
    t = 0
    while day <= d:
        ans += 1
        t += 1
        day = i * t + 1
print(ans)

Solution (Python):
import math
n = int(input())
d, x = map(int, input().split())
ans = 0
for _ in range(n):
    a = int(input())
    ans += math.ceil(d/a)

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 a:
    for j in range(0,d,i):
        ans += 1
ans += x
print(ans)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
d,x = inpl()
a = inpln(n)
cnt = 0
for i in range(n):
    for j in range(10000):
        tmp = a[i] * j + 1
        if tmp <= d:
            cnt += 1
        else:
            break
print(cnt+x)

Solution (Python):


import sys










def main():
    n, d, x, *a = (int(i) for i in sys.stdin.read().split())
    d -= 1
    c = n
    for i in range(n):
        c += d // a[i]
    total = c + x
    print(total)


if __name__ == "__main__":
    
    main()

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

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

Solution (Python):
n=int(input())
d,x=map(int,input().split())
for i in range(n):
  interval=int(input())
  eat=1
  while eat<=d:
    x+=1
    eat+=interval
print(x)

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

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = 0
res = X
for i in range(N):
    A = int(input())
    j = 1
    while j <= D:
        res += 1
        j += A

print(res)

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

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

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

Solution (Python):
import numpy as np

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

print(((D-1) // A).sum() + N + X)

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

cnt=0
for i in range(n):
    a=int(input())
    b=1
    while b <= d:
        cnt +=1
        b +=a

print(cnt+x)

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

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

count = 0
for a in A:
  count += (D-1) // a + 1

print(count + X)

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

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

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

for i in range(n):
    ai = int(input())
    total += (d-1)//ai
print(total+n)

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

for i in range(n):
    ai = int(input())
    for j in range(d):
        if d >= j*ai + 1:
            total += 1
        else:
            break
print(total)

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

for i in range(N):
    A=int(input())
    for j in range(1,D+1,A):
        ans+=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 = [0] * D
for i in range(N):
    d = 1
    c = 1
    while d <= D:
        ans[d - 1] += 1
        d = c * A[i] + 1
        c += 1


print(sum(ans) + X)

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

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

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

print(X)

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

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

for a in A:
  temp = 1
  while temp <= D:
    c += 1
    temp += a

print(c+X)

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())
A=[int(input()) for i in range(N)]

ans=X

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

print(ans)

Solution (Python):
N = int(input())
D, X = list(map(int, input().split()))
A = [int(input()) for _ in range(N)]
result = X
for n in range(N):
    if D % A[n] == 0:
        result += (D // A[n])
    else:
        result += (D // A[n]) + 1
print(result)

Solution (Python):
n = int(input())
d,x = map(int, input().split())
a = [int(input()) for i in range(n)]
sum=x
for j in range(n):
    for i in range(1,d+1):
        if (i-1)*a[j]+1>d:
            break
        else:
            sum+=1
print(sum)

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

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

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

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

for i in range(N):
    A = int(input())
    j = 0
    while j < D:
        X += 1
        j += A

print(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):
  d=1
  while(d<=D):
    ans+=1
    d+=A[i]
print(ans)

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

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())
arr = [0] * N
ans = 0
for i in range(N):
    arr[i] = int(input())
for i in range(N):
    day = 1
    while day <= D:
        ans += 1
        day += arr[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 A:
    if D % i == 0:
        ans += D // i
    else:
        ans += D // i + 1

print(ans + X)

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

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

for i in range(n):
    a = int(input())
    if d % a == 0:
        x += d//a
    else:
        x += d//a + 1

print(x)

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

n_eaten_choco = 0
for a in A:
    i = 0 
    while a*i + 1 <= D:
        n_eaten_choco += 1
        i += 1

print(X + n_eaten_choco)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline

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

main()

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

for i in range(N):
    A = int(input())
    n = 0
    while A * n + 1 <= D:
        X += 1
        n += 1

print(X)

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

Solution (Python):
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for _ in range(n)]
print(sum((d-1)//a[i]+1 for i in range(n))+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+=-(-d//a[i])
print(ans)

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    d, x = list(map(int, input().rstrip('\n').split()))
    cnt = 0
    for i in range(n):
        a = int(input().rstrip('\n'))
        cnt += ((d + a - 1) // a)
    print(cnt + x)


if __name__ == '__main__':
    slove()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    N = INT()
    D, X = MAP()
    A = []
    for _ in range(N):
        A.append(INT())

    lis=[]
    for x in A:
        lis.append(1 + (D-1)//x)
    print(sum(lis) + X)

if  __name__=='__main__':
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
D, X = MAP()
A = [INT() for _ in range(N)]

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

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

cnt = 0
for i in range(N):
    interval = 0
    while True:
        if 1 + A[i] * interval <= D:
            cnt += 1
            interval += 1
        else:
            break
print(cnt+X)

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

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    d, x = map(int, input().split())
    a = [int(input()) for _ in range(n)]
    x += sum([sum([j * i + 1 <= d for i in range(1, d + 1)]) + 1 for j in a])
    print(x)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    [D, X] = string_to_int(inputs[0])
    A = list(map(int, inputs[1:]))

    choco = X
    for a in A:
        d = 0
        while d * a + 1 <= D:
            choco += 1
            d += 1

    return choco


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    N = int(input())
    ret = solve(inputs(N+1))
    print(ret)

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

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

sum1 = 0
for interval in Data:
    sum1 += (D-1)//interval + 1

print(sum1+X)

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

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

Solution (Python):
def bb092():
    n = int(input())
    d,x = list(map(int, input().split()))
    c = 0
    for i in range(0, n):
        e = int(input())
        j = 1
        while j <= d:
            c += 1
            j += e

    print(c+x)

bb092()

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

for i in range(n):
    x += (d-1)//int(input())+1
print(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):
  chocolate=1+(D-1)//A[i]
  ans+=chocolate
print(ans)

Solution (Python):
n = int(input())
li = list(map(int,input().split()))
li2 = []
for i in range(n):
    li2.append(int(input()))

num ,a= 0,0
for i in range(len(li2)):
    while  True:
        if 1+a*li2[i]<=li[0]:
            num += 1
            a += 1
        else:
            a = 0
            break
print(num+li[1])

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

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

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

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

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

c = 0
for i in a:
    c += 1 + (d-1)//i
print(c+x)

Solution (Python):
part_num = int(input())
day_num, dif_num = map(int, input().split())
eat_day_list = []
[eat_day_list.append(int(input())) for _ in range(part_num)]

num_eat_list = []
for i in range(part_num):
    num_eat_list.append(int((day_num - 1) / eat_day_list[i]) + 1)


print(sum(num_eat_list) + dif_num)

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 = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))

ans = X
for i in range(N):
    for j in range(1,D+1):
        if (j-1)%A[i] == 0:
            ans += 1
print(ans)

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

Solution (Python):
n=int(input())
d,x=map(int,input().split())
a=[int(input())for i in range(n)]
c=0
for i in range(n):
    for j in range(100):
        if a[i]*j+1<=d:c+=1
        else:break
print(c+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 = []

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

ans = 0
for i in range(n):
    j = 0
    while j*a[i]+1 <= d:
        ans += 1
        j += 1
print(ans+x)

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

Solution (Python):
from collections import Counter
n = int(input())
d, x = map(int, input().split())
a = []
l = []
cnt = 0
for _ in range(n):
        a.append(int(input()))

for _a in a:
        for k in range(100):
                if k*_a + 1 <= d + 1:
                        l.append(k*_a + 1)
c = Counter(l)

for _d in range(1, d+1):
        cnt += c[_d]
print(cnt + x)

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

B=[(D-1)//A[i]+1 for i in range(N)]


print(sum(B)+X)