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:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
def A():
    a,b,c,d = IR(4)
    print(min(a,b)+min(c,d))

#B
def B():
    n = I()
    d,x = LI()
    a = IR(n)
    for i in range(1,d+1):
        for j in a:
            if (i-1)%j == 0:
                x += 1
    print(x)
#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    B()

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)]

count = n
for i in a:
    count += (d-1) // i

print(count + x)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
D = a[0]
X = a[1]
ate = 0
for i in range(n):
    temp = int(input())
    ate += (D-1) // temp + 1
print(str(ate+X))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def chocolate(N: int, D: int, X: int, A: list) -> int:
    # i 人目の参加者が食べる個数を m とすると、m は
    # (m-1)ai + 1 <= D
    # を満たす最大の m である。したがって、これを変形して、
    # m = 1 + (D-1)//ai
    # となる。
    # これを各 i について和をとって、残った X 個を足せば
    # 初日に用意されていた個数が算出できる。
    return X + sum(1 + (D-1)//a for a in A)


if __name__ == "__main__":
    N = int(input())
    D, X = map(int, input().split())
    A = [int(input()) for _ in range(N)]
    ans = chocolate(N, D, X, A)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
An = [int(input()) for i in range(N)]
ans = X
for n in range(1,N+1):
    ans+=1
    num = An[n-1]
    for i in range(1,100001):
        if num*i+1<=D:
            ans+=1
        else:
            break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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 c in A:
    chocolate += (D-1)//c + 1
print(chocolate)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
b = [int(input()) for _ in range(N)]
 
res = a[1]

for i in range(N):
    for ii in range(0,a[0]):
        if 1 + (b[i] * ii) <= a[0]:
            res += 1
        else:
            break
print(res)

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
for a in A:
    X += D // a + 1
    if D % a == 0:
        X -= 1
print(X)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc092/tasks/abc092_b

import itertools
import collections
import bisect

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
D,X = [int(n) for n in input().split()]
A = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
ans = N
for d in range(2,D+1):
    for a in A:
        if(d % a==1 or a == 1):
            ans+=1
print(ans+X)

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

Submission status: Accepted

Solution code:
import sys

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

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

    print(c + X)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
for i 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())
for i in range(N):
    X += (D - 1) // int(input())
print(N + X)

Submission status: Accepted

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

print(X+sum(L))

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc092/tasks/abc092_b
n = int(input())
d, x = [int(x) for x in input().split()]
res = 0
for _ in range(n):
    a = int(input())
    res += (1 + (d - 1) // a)
print(x + res)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

s = 0

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

print(s + X)

Submission status: Accepted

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

s = 0

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

print(s + X)

Submission status: Accepted

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

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

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 range(n):
    ans+=d//A[i]
    if d%A[i]>0 :
        ans+=1
    #print(ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
# from collections import Counter, defaultdict

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

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


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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

print(cnt + x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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


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

print(count + int_x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def eat():
    i = 0

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

    return i


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

ans = 0

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

print(ans + X)

Submission status: Accepted

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

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 j in range(n):
    for k in range(100):
        if a[j]*k+1<=d:
            x+=1
        else:
            break
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math
import fractions

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


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

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

n = ip()                              #入力整数1つ
d,x= (int(i) for i in input().split())      #入力整数横2つ
#k,a,b = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列

#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
a =[]
for i in range(n):
    a.append(ip())
s = 0
for i in range(n):
    if d%a[i]:s+=d//a[i] + 1
    else: s+=(d//a[i])
print(s+x)

Submission status: Accepted

Solution code:
""" AtCoder """

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

ans = 0

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

print(ans + X)

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]!=0:
        ans += d//a[i]
    else:
        ans += d//a[i]-1
print(ans+n+x)

Submission status: Accepted

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

sum = 0
for n in range(N):    #ここで人数
    sum += 1
    for d in range(1,D+1):#ここで日数
        result = A[n] * d + 1
        if result <= D:
            sum += 1

sum = X + sum

print(sum)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

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

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

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

print(choco)

Submission status: Accepted

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

Submission status: Accepted

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

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 += (D + a - 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)]
ans=0
for i in range(N):
    n=0
    while(1):
        if a[i]*n+1>D:
            break
        else:
            ans+=1
            n+=1
print(ans+X)

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 range(n):
  ans+=int((d-1)/a[i])+1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

    cnt = 0
    for a in a_:
        i = 1  # スタート
        while i <= d:
            i += a
            cnt += 1
    print(cnt + x)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

    print(len(l) + x)


if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans+X)

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

print(ans+x)

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
# from collections import Counter, defaultdict

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

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


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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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)//a
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

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

    print(r)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(c + x)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

ans = eat + x
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()))
ans = X
for i in range(N):
    count = 0
    while A[i] * count + 1 <= D:
        ans += 1
        count += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
for i in range(N):
  a=int(input())
  X+=(D-1+a)//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)]
total=x
for j in a:
  total+=len(range(1,d+1,j))
print(total)

Submission status: Accepted

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

print(sum(a) + X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

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

print(eaten_choco + X)

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
ans=n
for i in range(n):
    ans+=(d-1)//int(input())
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()))
sum= N
for j in A:
    sum+=int((D-1)/j)
print(sum+X)

Submission status: Accepted

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


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

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


if __name__ == "__main__":
    main()

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)]
#print(n,d,x,a)

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Sum=0

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

print(Sum+M)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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