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



Sample input:
3
7 1
2
5
10


Sample output:
8

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a=[]
b=[]
for i in range(n):
    c=int(input())
    a.append(c)
for l in range(n):
    k=0
    for j in range(d+1):
        k=j*a[l]+1
        if k>d:
            break
    b.append(j)
print(sum(b)+x)

Submission status: Accepted

Solution code:
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):
    c = 0
    while True:
        if c * a[i] + 1 > d:
            break
    
        ans += 1
        c += 1

ans += x

print(ans)

Submission status: Accepted

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

S = X

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

Submission status: Accepted

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

for a in A:
    for d in range(1, D+1):
        if d == 1:
            X += 1
        elif (d-1) % a == 0:
            X += 1

print(X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
num = 0
for i in range(n):
    a = int(input())
    for j in range(1, d + 1, a):
        num += 1
print(x+num)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]
count = 0
for i in a:
    dd = d
    n = 0
    while True:
        if dd < n*i + 1:
            break
        n += 1
        count += 1

ans = count + x
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int, input().split())
count = 0
list_a = []
while count < n:
    list_a.append(int(input()))
    count += 1
ans = 0
for number in list_a:
    ans += (d - 1) // number + 1
print(ans + x)

Submission status: Accepted

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

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

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = x
for v in a:
    tmp = 1
    while tmp <= d:
        ans += 1
        tmp += v

print(ans)

Submission status: Accepted

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

n_eaten = 0
for a_i in a_list:
    k = 0
    while k * a_i + 1 <= d:
        n_eaten += 1
        k += 1

print(n_eaten + x)

Submission status: Accepted

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

ans = X
for i in range(N):
    num = 1 + D // A_list[i]
    if D % A_list[i] == 0:
        num -= 1

    ans += num

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

index=0
while index<n:
    a = int(input())
    index2=0
    while True:
        if 1+a*index2<d+1:
            x+=1
            index2+=1
        else:
            break
    index+=1
print(x)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D, X = list(map(int, input().split()))
a = [int(input()) for i in range(N)]
num = [0 for i in a]
ans = X

for i in range(D):
    for j in range(N):
        if i % a[j] == 0:
            num[j] += 1

for j in range(N):
    ans += num[j]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def AtCoder_B():
    N=input()
    D,X=input().split()
    Sum=0
    for i in range(int(N)):
        Sum+=int((int(D)-1)/int(input()))+1
    print(Sum+int(X))
    return

AtCoder_B()

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = inp()
D,X = inpl()
ans = 0
for i in range(N):
	a = inp()
	ans += (D-1)//a+1

print(ans+X)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
A=[int(input()) for i in range(N)]
sum=0
for i in range(len(A)):
    n=1
    while 1+(n-1)*A[i]<=D:
        sum+=1
        n+=1
print(sum+X)

Submission status: Accepted

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

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

ans = X

for i in range(1, D+1):
    for j in A:
        if j == 1:
            ans += 1
        elif i % j == 1:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
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):
    count += (D-1) // A[i] + 1

print(X+count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#92b
import math
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for _ in range(n)]
ans=0
for i in range(n):
    ans+=math.ceil(d/a[i])
print(ans+x)

Submission status: Accepted

Solution code:
N=int(input())
D,X=(int(i) for i in input().split())
a=[int(input()) for i in range(N)]
for s in range(N):
	c=(D-1)//a[s]+1
	X+=c
print(X)

Submission status: Accepted

Solution code:
N=int(input())
D,X=(int(i) for i in input().split())
a=[int(input()) for i in range(N)]
goukei=X
for s in range(N):
	c=(D-1)//a[s]+1
	goukei+=c
print(goukei)

Submission status: Accepted

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

count = 0
for i in range(N):
    a = a_list[i]
    count += len([i +1 for i in range(D) if i % a == 0])
print(count + X)

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = []
sum = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for i in range(N):
    day = 1
    while True:
        if day > D:
            break
        cnt += 1
        #print(day)
        day += A[i]

print(cnt + X)

Submission status: Accepted

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

ans = X

for i in range(N):
  A = int(input())
  ans += D // A + int(D%A>0)
  
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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]):
        ans += D // A[i] + 1
    else:
        ans += D // A[i]
print(ans + X)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


# --------------------------------------------

dp = None


def main():
    N = int(input())
    D, X = li_input()

    eaten = 0

    for i in range(N):
        a = int(input())
        eaten += math.ceil(D / a)

    print(eaten + X)


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math;
n=int(input())
d,x=map(int,input().split())
for i in range(n):x+=math.ceil(d/int(input()));
print(x)

Submission status: Accepted

Solution code:
answer = 0
N = int(input())
D,X = map(int,input().split())
for i in range(N) :
    a = int(input())
    for j in range(D) :
        if j*a + 1 <= D :
            answer += 1
        else :
            break
print(answer+X)

Submission status: Accepted

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

sum_c = 0
for _ in range(N):
    A = int(input())
    choco = 0
    for i in range(0, 100):
        day = i * A + 1
        if day > D:
            break
        choco += 1
    sum_c += choco
print(sum_c + X)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a = [int(input()) for i in range(n)]
b = [d//a[j] if d%a[j]==0 else (d//a[j]+1) for j in range(len(a))]
print(sum(b)+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for _ in range(n)]
tmp=[0 for _ in range(d)]
for i in a:
    x += len(tmp[::i])
print(x)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
for _ in range(N):
  n=int(input())
  if D%n:
    X+=(D//n)+1
  else:
    X+=(D//n)
print(X)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

ans = X
for a in A:
    day = 1
    while day <= D:
        ans += 1
        day += a
print(ans)

Submission status: Accepted

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

    
Total = X + B

print(Total)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
al = [int(input()) for _ in range(n)]
for i in range(1, d+1):
  for a in al:
    if a == 1 or i % a == 1:
      x += 1
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

res = x 
for k in a:
    res += 1 + (d - 1) // k
print(res)

Submission status: Accepted

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

a = [int(input()) for i in range(N)]
z = 0
sum = 0
for i in a:
    while i*z+1<=D:
        z+=1
        sum+=1
    else:
        z =0
        pass
print(sum+X)

Submission status: Accepted

Solution code:
import math
n = int(input())
d, x = map(int, input().split())
a = []
for i in range(n):
    a.append(int(input()))
count_day = [0 for i in range(n)]
for i in range(n):
    count_day[i] = math.ceil(d / a[i])
ans = x + sum(count_day)
print(ans)

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

su = 0
for i in a:
        c = [(j*i+1) for j in range(0,d) if (j*i+1) <= d]
        # print(c)
        su = su + len(c)
print(su+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

print(X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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):
    if A[i]<=D:
        ans+=(D-1)//A[i]+1
    else:
        ans+=1
print(ans+X)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ans = x
for _ in range(n):
  a = int(input())
  ans += len(range(1, d+1, a))
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()

d = int(l[0])
x = int(l[1])

ans = n + x

for i in range(0, n):
	a = int(input())
	ans += int(d / a)
	if d%a == 0:
		ans -= 1

print(ans)

Submission status: Accepted

Solution code:
import math

N=int(input())

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

count=0

for i in range(N):
  A=int(input())
  count+=math.ceil(D/A)

print(X+count)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    d, x = [int(i) for i in input().split()]
    ax = [int(input().strip()) for i in range(n)]

    print(sum([(d + a - 1) // a for a in ax]) + x)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
people = int(input())
days, remains = [int(i) for i in input().split()]
res = 0
for i in range(people):
    nth = int(input())
    d = 1
    while d <= days:
        res += 1
        d += nth
print(res + remains)

Submission status: Accepted

Solution code:
n = int(input())
d, x = [int(_) for _ in input().split(' ')]

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

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
ans=0
for _ in[0]*N:
    A=int(input())
    ans+=(D+A-1)//A
print(ans+X)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
print(sum(1+(D-1)//int(input())for _ in[0]*N)+X)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
ans=0
for _ in[0]*N:
    A=int(input())
    ans+=(D+A-1)//A
print(ans+X)

Submission status: Accepted

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

print(res+x)

Submission status: Accepted

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

choco = x
for i in range(n):
    a_i = int(input())
    if a_i == 1:
        choco += d
    else:
        choco += (d-1)//a_i + 1
    
print(choco)

Submission status: Accepted

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


def count_days(a,D):
    count = 1
    for d in range(2,D+1):
        if a*(d-1)+1 <= D:
            count+=1
    return count

print(sum([count_days(a,D) for a in A])+X)

Submission status: Accepted

Solution code:
N=int(raw_input())
D,X=map(int,raw_input().split())
A=[int(raw_input()) for i in xrange(N)]
print X+sum([(D+ai-1)/ai for ai in A])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
n = int(n)
d, x = input().split(" ")
d = int(d)
x = int(x)

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

cookie = 0
for a in a_list:
	for i in range(1000):
		day = (a * i) + 1
		if day > d:
			break
		else:
			cookie += 1

print(cookie + x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

count = 0
for i in A:
    count += 1
    tmp = i
    for n in range(1,100):
        if D >= i*n +1:
            count += 1
        else:
            break
print(count+X)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from itertools import count, takewhile

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

print(sum(sum(1 for _ in takewhile(lambda y: y<=d, count(1, a))) for a in ais) + x)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,D,X = 0, 0, 0
A = []
Sum = 0
while True:
    N = int(input())
    a = input().split()
    D, X = int(a[0]), int(a[1])
    if (N or D or X) <1  or (N or D or X) >100:
        continue
    for i in range(N):
        a = input()
        if int(a)>=1 or int(a)<=100:
            A.append(int(a))
        else:
            continue

    for i in A:
        Sum = Sum + int(D/i) + 1
        if int(D/i) == D/i:
            Sum = Sum -1
    break
print(Sum + X)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math

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

a = []
for i in range(N):
    a.append(int(input()))
    
for i in range(N):
    sum += math.floor((D-1)/a[i]) + 1
    
print(X + sum)

Submission status: Accepted

Solution code:
N = int(input())
d,x = input().split()
D = int(d)
X = int(x)

count = 0
for i in range(N):
	A = int(input())

	j=0
	while(j*A+1<=D):
		count += 1
		j += 1


sum_choco = count + X

print(sum_choco)

Submission status: Accepted

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

A=[None]*N

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

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

Submission status: Accepted

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

for j in a:
    cnt = 0
    b = 0
    while b*j+1 <= D:
        cnt += 1
        b += 1
    c.append(cnt)

print(sum(c) + X)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
a = []
for i in range(N):
    a.append(int(input()))
    
sum = 0

for j in a:
    cnt = 0
    b = 0
    while b*j+1 <= D:
        cnt += 1
        b += 1
    sum += cnt

print(X + sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0

for i in range(N):
  chocoN = 0
  for k in range(D):
    if k*A[i]+1 <= D:
      chocoN = chocoN + 1
  sum = sum + chocoN

print(sum + X)

Submission status: Accepted

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

A=[]

ans=N

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

for i in range(N):
    
    for k in range(1,102):
        if A[i]*k+1<=D:
            ans+=1

ans+=X

print(ans)

Submission status: Accepted

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

count = 0

for i in range(A):
    count += int((D-1)/arr[i] + 1)
   
print(count + X)

Submission status: Accepted

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

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

for i in range(n):
    l = 1
    while l <= d:
        k += 1
        l += a[i]

print('{}'.format(k + x ))

Submission status: Accepted

Solution code:
n=int(input())
d,x = map(int, input().split(' '))
A = 0
while n > 0:
    a = int(input())
    if d % a == 0:
        A += d // a
    else:
        A += d // a + 1
    n -= 1
print(A+x)

Submission status: Accepted

Solution code:
N=int(input())
D,X = map(int,input().split())
day = D
cnt=0
for i in range(N+1):
  if i==0:
    pass
  else:
    D = day
    A=int(input())
    while D>=0:
      if D*A+1<=day:
        cnt+=1
      D-=1
print(cnt+X)

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

count = 0
for i in a_list:
  j = 0
  while i * j + 1 <=d:
    count += 1
    j += 1

print(count + x)

Submission status: Accepted

Solution code:
N = int(input())
D,X = (int(i) for i in input().split())


count = X

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

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


print(count)

Submission status: Accepted

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

chocolate = 0
for i in range(N):
    count = 0
    for j in range(D+1):
        if j == (count * A[i] + 1):
            chocolate += 1
            count += 1
print(chocolate + X)

Submission status: Accepted

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

def main():
    days = D - 1
    ans = X
    for _ in range(N):
        a = int(input())
        ans += (days // a) + 1
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a = []
for i in range(n):
    a.append(int(input()))
eat_chocolate = 0
for i in range(n):
    Ai = a[i]
    m = 1
    eat_day = 1
    while eat_day <= d:
        eat_day = Ai*m + 1
        eat_chocolate += 1
        m += 1
print(eat_chocolate+x)

Submission status: Accepted

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

print(sum([int((D - 1) / A[i]) for i in range(N)]) + X + N)

Submission status: Accepted

Solution code:
import math

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

ans = x
for _ in range(n):
    a = int(input())
    ans += math.floor((d - 1) / a + 1)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split(' '))
for i in range(N):
    A = int(input())
    days_ate = len([i for i in range(1,D+1,A)])
    X += days_ate
print(X)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = []

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

sum_list = []
for i in A:
    if (D % i) != 0:
        sum_list.append(int(D/i)+1)
    else:
        sum_list.append(int(D/i))

print(sum(sum_list)+X)

Submission status: Accepted

Solution code:
from functools import reduce
n = int(input())
d, x = [ int(i) for i in input().split(' ')]

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

print( x + sum(map(lambda x: (d-1) // x + 1, a)))

Submission status: Accepted

Solution code:
member = int(input())
day,remainder = map(int,input().split())
eatrate = []
for i in range(member):
    eatrate.append(int(input()))
l = []
temp = list(range(day))
for r in eatrate:
    l.append(temp[::r])
print(sum([len(i) for i in l]) + remainder)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

def count(j):
    k = 0
    choco = 0
    while (1 + j*k) <= d:
        choco += 1
        k += 1
    return choco

i=1
while i <= n:
    j = int(input())
    x += count(j)
    i += 1

print(x)