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 = list(map(int, input().split()))
for i in range(n):
	a = int(input())
	x += d // a + (d % a != 0)

print(x)

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    d,x = f()
    ans = 0
    for i in range(n):
        a = f()[0]
        ans += (d+a-1)//a
    
    print(ans + x)


solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
ans = 0
for i in range(N):
    A = int(input())
    sankasya_i = 0
    j = 0
    while(True):
        day = A*j+1
        j+=1
        if(day > D):
            break
        sankasya_i += 1
    ans += sankasya_i
print(ans+X)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split(' '))
A = list(int(input()) for i in range(N))
num = 0
for i,j in enumerate(A):
  x = 1
  y = j
  while y+1  <= D:
    x += 1
    y += j
  num += x
print(num + 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 = X
for i in A:
    ans += int((D+i-1)/i)
print(ans)

Submission status: Accepted

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

for j in range(n):
    a_list[j]=(d-1)//a_list[j]+1

print(sum(a_list)+x)

Submission status: Accepted

Solution code:
N = int(input())

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

s = []
for _ in range(N):
  a = int(input())
  for i in range(D+1):
    if a*i+1 > D:
      s.append(i)
      break
  else:
    continue    
      
print(sum(s)+X)

Submission status: Accepted

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

for i in range(1,N+1):
	for j in range(1,999999):
		if D<j*A[i-1]+1:
			break
		else: sum+=1
print(sum+X)

Submission status: Accepted

Solution code:


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

    return n, d, x, alist


def submit():
    n, d, x, alist = read_input()

    choco = 0
    for a in alist:
        i = 0
        while i*a + 1 <= d:
            choco += 1
            i += 1

    print(choco + x)


if __name__ == '__main__':
    submit()

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 range(N):
  j = 0
  a = 0
  while a <= D:
    a = j*A[i] + 1
    if a <= D:
      choco += 1
    j += 1
    
print(choco)

Submission status: Accepted

Solution code:
n = int(input())
d,x=[ int(it) for it in input().split() ]
al=[]
for i in range(n):
  al.append(int(input()))
s = 0
s += x
for i in range(d):
  nichi = i+1
  for a in al:
    if (nichi-1)%a==0:
      s+=1
print (s)
#print (n,d,x,al)

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

Submission status: Accepted

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

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 i in a:
	j=0
	while j*i+1<=d:
		ans+=1
		j+=1
print(ans)

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:

from math import ceil

N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
chocolate = X
for i in range(N):
    chocolate += ceil(D / A[i])

print(chocolate)

Submission status: Accepted

Solution code:
from math import ceil
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
ans = X
for i in range(N):
	ans += ceil(D / A[i])
print(ans)

Submission status: Accepted

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

for i in range(n):
    for j in range(1, d+1, int(input())):
        x += 1
print(x)

Submission status: Accepted

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

	print(ans)


if __name__ == '__main__':
	main()

Submission status: Accepted

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

c = 0
for ai in a:
    c += (d - 1) // ai + 1

print(c + 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:
    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)]
ans = N
for i in A:
    j = i + 1
    while j <= D:
        ans += 1
        j += i
print(ans + X)

Submission status: Accepted

Solution code:
import sys
from collections import Counter

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

for i in a_list:
    ans += d // i
    if d % i != 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int, D: int, X: int, A: "List[int]"):
    ans = 0
    for i in range(N):
        ans += 1 + (D-1)//A[i]
    print(ans+X)

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, D, X, A)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

choco = 0
for i in range(N):
    day = 1
    while day <= D:
        choco += 1
        day += Alist[i]

print(choco+X)

Submission status: Accepted

Solution code:
import math
ans = 0

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

for i in range(N):
    x = int(input())
    cnt = math.ceil(D/x)
    ans += cnt
ans += X
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
[D,X] = list(map(int,input().split()))
A = [int(input()) for i in range(N)]
ans = X
for a in A:
    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)]
cnt = 0
for i in range(n) :
    b = 0
    while b + 1 <= d :
        cnt += 1
        b += a[i-1]
print(cnt + x)

Submission status: Accepted

Solution code:
# ABC092B - Chocolate
n = int(input())
d, x = list(map(int, input().rstrip().split()))
lst = list(map(int, [input().rstrip() for _ in range(n)]))
total = x + n

for i in lst:
    total += (d - 1) // i
    
print(total)

Submission status: Accepted

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

eat = 0
for _ in range(1, N+1):
  a = int(input())
  for i in range(D + 10):
    if (i * a) + 1 <= D:
      eat += 1
    else:
      break
print(eat + X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,d,x,*a=map(int,open(0).read().split())
s=[len(range(1,d+1,c)) for c in a]
print(sum(s)+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()) #日数、残り
ass = [int(input()) for _ in range(n)] #係数
thirst= ass.copy()

ate = n #1日目

for i in range(2,d+1): #毎日、食べた人数を足していく
  for j,a in enumerate(ass):
    t = thirst[j]
    t -= 1
    if t == 0:
      ate += 1
      thirst[j] = a
    else: thirst[j] = t

print(ate + x) #元々の個数

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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


cnt = 0

for i in a:
    for j in range(200):
        if 1 + i*j <=d:
            cnt += 1
        else:
            break


print(x+cnt)

Submission status: Accepted

Solution code:
import math

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

ans = 0

for i in range(n):
    ans += math.ceil(d/int(input()))

print(ans + x)

Submission status: Accepted

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

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:
    X += int((D-1)/a)+1
print(X)

Submission status: Accepted

Solution code:
N = int(input())
D,X = list(map(int,input().split()))
A = [int(input()) for _ in range(N)]
for a in A:
    for i in range(1,D+1):
        if i % a == 1:
            X += 1
        elif a == 1:
            X += 1
print(X)

Submission status: Accepted

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

Submission status: Accepted

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

def ai_eat_num(ai,day):
    x=0
    while 1+x*ai <= day:
        x += 1
    return x

cnt=0
for i in range(N):
    cnt+=ai_eat_num(a[i],D)
print(cnt+X)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    count = 1
    for j in range(1, D+1):
        if j == count * A[i] + 1:
            sum += 1
            count += 1

print(sum + X)

Submission status: Accepted

Solution code:
def MI(): return map(int, input().split())
def II(): return int(input())
def IS(): return input()
def LI(): return list(map(int, input().split()))


n = II()
d, x = MI()
a = [II() for _ in range(n)]
ans = 0
for i in range(n):
    ans += len([i for i in range(1,d+1,a[i])])
print(ans + x)

Submission status: Accepted

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

choco = X
for i in range(N):
    A = int(input())
    d = 1
    while d <= D:
        choco += 1
        d += A
print(choco)

Submission status: Accepted

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

count = 0
for i in range(N):
    for j in range(D):
        if 0 == j % A[i]:
            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)]

chocolate = 0
for i in A:
    if D % i:
        day = D // i + 1
    else:
        day = D // i
    chocolate += day

print(chocolate + X)

Submission status: Accepted

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

ans = 0
for a in A:
    for i in range(100):
        if i*a+1 > D:
            break
        ans += 1

print(ans+X)

Submission status: Accepted

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

answer = x

for i in range(n):
    a = int(input())
    day = 1
    while day <= d:
        if (day - 1) % a == 0:
            answer += 1
        day += 1

print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
d,x=map(int,input().split())
a=list(int(input()) for i in range(N))
sum=0
for i in range(N):
    key=0
    X=1
    while X<=d:
        key+=1
        X+=a[i]
    sum+=key
print(sum+x)

Submission status: Accepted

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

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):
  j = 0
  while j * a[i] + 1 <= d:
    ans += 1
    j += 1
    
print(ans + x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N=int(input())
D,X=map(int, input().split())
print(X+sum([math.ceil(D/int(input())) for _ in range(N)]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d, x = list(map(int, input().split()))
a = [int(input()) for i in range(n)]
import numpy as np
count = n
for i in range(n):
    if a[i] <= d:
        #print(a[i])
        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 _ in range(N)]

ans = X

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

print(ans)

Submission status: Accepted

Solution code:
import math

n=int(input())
d,r=map(int,input().split())
ans=r
for i in range(n):
  m=int(input())
  ans+=math.ceil(d/m)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 range(N):
    for j in range(1,D+1,A[i]):
        count += 1
print(count+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())
    X += (D+A-1)//A
print(X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a,b=map(int,input().split())
c=0
for i in range(n):
  d=int(input())
  e=0
  while d*e+1<=a:
    c+=1
    e+=1
print(c+b)

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 += (D-1)//A +1
print(ans+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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())
cnt = 0
for i in range(n):
    a = int(input())
    st = 1
    while st <= d:
        st += a
        cnt += 1
print(cnt+x)

Submission status: Accepted

Solution code:
import math

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

Ans = X

for i in A:
  Ans += math.ceil(D / i)

print(Ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(raw_input())
d, x = map(int, raw_input().split())
count = 0
for i in range(n):
	a = int(raw_input())
	tmp = int((d - 1) / a) + 1
	count += tmp
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()))
s=0
for i in range(n):
  for j in range(d):
    if a[i]*j+1<=d:
      s+=1
print(s+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
# i人目の参加者
for i in range(N):
    for j in range(100):
        if j*A[i]+1 <= D:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
D,X,=map(int,input().split())
An=[int(input()) for _ in range(N)]
c = 0
for n in range(N):
    i = 0
    while True:
        d = i*An[n] + 1
        if d > D:
            break
        c += 1
        i += 1
print(c+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())

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 i in range(n)]
ans=0
for i in a:
    tmp=1
    while True:
        if tmp*i+1<=d:
            a=tmp*i+1
            #print(a)
            tmp+=1
        else:
            #print("tmp",tmp)
            ans+=tmp
            break
print(ans+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()))

List = []
for i in range(N):
    l = [j for j in range(1, D + 1) if (j - 1) % A[i] == 0]
    List.append(l)

tmp = 0
for i in range(N):
    tmp += len(List[i])

print(tmp + X)

Submission status: Accepted

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

a = []
for i in range(n):
  a.append(int(input()))
           
ans = 0
for item in a:
  ans += (d - 1) // item
ans += n

print(ans + x)

Submission status: Accepted

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

n = int(input())
d, x = map(int,input().split())
a = [0] * n
for i in range(n):
    a[i] = int(input())
choco = [0] * d
for i in range(n):
    for j in range(100):
        if a[i]*j+1 > d:
            break
        choco[a[i]*j] += 1

print(x + sum(choco))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = []
for _ in range(n):
    a.append(int(input()))
b = []
for a_ in a:
    b.extend(list(range(1, d+1, a_)))
print(len(b)+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 += -(-D//a)
print(ans+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
count = 0
for i in range(N):
    a = int(input())
    for d in range(D):
        calc = d * a + 1
        if calc > D:
            break
        else:
            count+=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)]
t = 0
c = X
for i in range(N):
    t = A[i]
    for j in range(100):
        if 1 + t * j <= D:
            c += 1
        else:
            break
print(c)

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
d,x = [int(_) for _ in stdin.readline().rstrip().split()]
data = [int(stdin.readline().rstrip()) for _ in range(n)]
# -(-d//i) is ceiling
print(sum([-(-d//i) for i in data])+x)

Submission status: Accepted

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


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

cnt = 0

for i in range(N):
    A = int(input())
    cnt += (D - 1) // A + 1
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+=1+(d-1)//a
print(ans)

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 a:
    ans += ((d-1)//i)
    ans += 1
print(ans + x)

Submission status: Accepted

Solution code:
def solve(string):
    n, d, x, *a = map(int, string.split())
    return str(sum([d // _a + 1 if d % _a > 0 else d // _a for _a in a]) + x)


if __name__ == '__main__':
    n = int(input())
    print(solve('{}\n'.format(n) + '\n'.join([input() for _ in range(n + 1)])))

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a=[]
for i in range(n):
    a.append(int(input()))
ctr=0
for i in range(n):
    for k in range(101):
        if k*a[i]+1<=d:
            ctr+=1
        else:
            break
print(ctr+x)

Submission status: Accepted

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

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

Submission status: Accepted

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

eat = 0
for i in range(n):
    for j in range(d):
        if a[i]*j+1 <= d:
            eat += 1
        else:
            break

print(eat + x)

Submission status: Accepted

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

Submission status: Accepted

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

ans = X
for A in As:
    day = 0
    while day < D:
        ans += 1
        day += A

print(ans)

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
for _ in range(N):
    A=int(input())
    X+=(D-1)//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)]
b=[int(d/l) for l in a if d%l==0]+[int(d/l)+1 for l in a if not d%l==0]
print(x+sum(b))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N = int(lines.pop(0))
    D,X = map(int, lines.pop(0).split(' '))
    NLIST = []
    res = 0
    for i in range(N):
        a = int(lines.pop(0))
        res += (D - 1)// a + 1
    res += X
    print(res)

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

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:
N=int(input())
D,X=map(int,input().split(' '))
A=[int(input()) for i in range(N)]
print(sum([((D-1)//a)+1 for a in A])+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:
    ans += (D - 1) // a + 1
print(ans)

Submission status: Accepted

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

total = X
for i in range(N):
    day = 1
    while day <= D:
        total += 1
        day += Ai[i]
print(total)

Submission status: Accepted

Solution code:
# /usr/bin/python
# -*- coding: utf-8 -*-


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

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
for i in range(N):
    tmp = int(input())
    X += 1 + D // tmp
    if D % tmp == 0: 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)]

for i in a:
    if d % i != 0:
        x += (d // i) + 1
    else:
        x += (d // i)
print(x)

Submission status: Accepted

Solution code:
#92B
n = int(input())
d,x = map(int,input().split())
a = list(map(int, [input() for i in range(n)]))
answer = 0

for i in range(1,d+1):
	for j in a:
		if (i-1)%j == 0:
			answer += 1
print(answer+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return list(sys.stdin.readline())
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
mod = 1000000007

#A
"""
a = IR(2)
b = IR(2)
print(min(a)+min(b))
"""

#B
n = I()
d, x = LI()
a = IR(n)
ans = x
for i in a:
    k = 0
    while k * i + 1 <= d:
        ans += 1
        k += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D, ans = map(int, input().split())
for _ in range(N):
    ans += -(-D//int(input()))
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()))
    
c = 0
choco = []

for i in range(n):
	for j in range(100):
		k = j*a[i] + 1
		c += 1        
		if k > d:        
			choco.append(c-1)
			c = 0
			break	            
            
print(sum(choco) + x)

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

Submission status: Accepted

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

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

print(X)