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

ans = 0
for i in range(N):
    ans += (D-1)//A[i]
print(X + N + 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(0, d, a):
        x += 1
print(x)

Submission status: Accepted

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

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

    print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())
day,amari = map(int,input().split())
for i in range(count):
  next_day = int(input())
  day_count =1
  while day_count <= day:
    amari += 1
    day_count += next_day

    
print(amari)

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):
    ans+=int((d-1)//a[i]+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)]
ans = X
for i in A:
    for _ in range(1, D+1, i):
        ans += 1
print(ans)

Submission status: Accepted

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

count = X

for a in As:
  count += (D-1) // a + 1
  
print(count)

Submission status: Accepted

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

N = II()
D, X = ISI()
A = [II() for i in range(N)]
cnt = 0
for i in range(N):
    cnt += (D-1)//A[i]+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)]

ans = x
for ele in a:
    ans += (d - 1) // ele + 1

print(ans)

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


N =  int(sys.stdin.readline())
D, X=  map(int, sys.stdin.readline().split())

L =  [int(sys.stdin.readline()) for _ in range(N)]

ans = X

for a in L:
    for i in range(D):
        t = a * i + 1
        if t <= D:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split()) #D:Day X:あまり
A = []
for i in range(N):
  A.append(int(input()))
c = 0
n = 0
s = 0
for a in A:
  n = (D-1)//a + 1
  #print(n)
  s += n
  #print((n+1)*(2+a*n)//2)
print(X+s)

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

Submission status: Accepted

Solution code:
#N = int(input())
#N, K = map(int,input().split())
#lst = [list(map(int,input().split())) for i in range(Q)]
#A = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]

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

eaten = 0
for i in range(N):
  eaten_i = (D - 1) // A[i] + 1
  eaten += eaten_i
  
print(eaten + 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+=1
    if d%a[i] != 0:
        ans+=d//a[i]
    else:
        ans+=(d//a[i])-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 = 0
for aa in a:
    total += (d - 1) // aa + 1
print(x + total)

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

Solution code:
import sys
from statistics import *
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
d, x = na()
ct = 0
for i in range(n):
    a = ni()
    ct += len([1 + a * i for i in range(100) if 1 + a * i <= d])
print(ct + x)

Submission status: Accepted

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

c = []
for i in a:
    if d % i != 0:
        c.append(d // i + 1)
    else:
        c.append(d // i)

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)]
c = 0

for i in range(n):
  for j in range(1,101):
    tmp = j*a[i]+1
    if tmp > d:
      c += j
      break
      
      
print(c + x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
src = [int(input()) for _ in range(n)]
count = 0
for s in src:
    count += (d - 1)//s + 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)]
lst = []

for i in range(n):
  for j in range(1,101):
    tmp = j*a[i]+1
    if tmp > d:
      lst.append(j)
      break
      
      
print(sum(lst) + x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

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


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
N = int(input())
Nums = [int(e) for e in input().split()]
D = Nums[0]
X = Nums[1]
dayList = []
for i in range(N):
  dayList.append(int(input()))
#Xは最後にたすよね～　各人数forで
totalChocolate = X
for i in range(N):
  Ai = dayList[i]
  chocolateCount = 0
  j = 0
  while Ai * j + 1 <= D:
    chocolateCount += 1
    j += 1
  totalChocolate += chocolateCount
print(totalChocolate)

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
ans=X
l=[]
for i in range(N):
  l.append(int(input()))
def f(n):
  ans=1
  if n>D:
    pass
  else:
    ans+=int((D-1)//n)
  return ans

for i in range(N):
  ans+=f(l[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))
ans = 0

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

Submission status: Accepted

Solution code:
N = int(input())
D, X = [int(_) for _ in input().split()]
print(sum(map(lambda x: D // x + int(D % x != 0), [int(input()) for _ in range(N)])) + X)

Submission status: Accepted

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

ans = 0
for _ in range(N):
    a = int(input())
    i = 0
    while i < D:
        ans += 1
        i += a

print(ans + 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)]
cnt = n

for i in range(n):
  for j in range(1,d):
    if j*a[i]+1 <= d :
      cnt = cnt + 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)]
print(sum([(d-1)//ai for ai in a])+x+n)

Submission status: Accepted

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

    sumsum += plus

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

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

ans=x
for tmp in inputs:
  i=-1
  while True:
    i+=1
    day=i*tmp+1
    if day>d:
      break

    ans+=1
    
print(ans)

Submission status: Accepted

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

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 + 1
  
print(x)

Submission status: Accepted

Solution code:

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

total = 0
for i in A:
    for j in range(1, d+1, i):
        total += 1

print(total + x)

Submission status: Accepted

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

x = x + n

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

print(x)

Submission status: Accepted

Solution code:



def main():
    
    N = int(input())
    D,K = map(int,input().split())
    conSumeList = [int(input()) for _ in range(N)]
    tmp = 0
    ans = 0

    for i in range(N):
        ans += 1
        tmp += conSumeList[i]
        while(True):
            if tmp+1 <= D:
                ans += 1
                tmp += conSumeList[i]
            else:
                break
        tmp = 0
    
    print(ans+K)




    


if __name__== "__main__":
    main()

Submission status: Accepted

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

print(sum + x)

Submission status: Accepted

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

Submission status: Accepted

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


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

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 i in range(n):
    A=0
    count=0
    
    while(A*a[i]+1<=d):
        count+=1
        A+=1
    sum_count+=count
print(sum_count+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(s)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
for _ in range(n):
  a=int(input())
  day=1
  while day<=d:
    x+=1
    day+=a
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 += D//a
    if D%a!=0:
        ans+=1
print(ans + X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
box=[int(input()) for i in range(n)]
count=0
for i in box:
    if d%i==0:
        count +=d//i
    else:
        count +=(d//i)+1
print(count+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 = ans + (D - 1 + A) // A

print(ans + X)

Submission status: Accepted

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

for _ in range(N):
  a = int(input())
  i = 0
  while i*a+1<=D:
    X+=1
    i+=1
print(X)

Submission status: Accepted

Solution code:
#まずAiで、D日間のときに食べる個数をとる関数choco
def choco(a,d):
    c=0 #チョコの個数 
    while c*a+1<=d: #合宿期間に食べれるまでcを増やす
        c+=1
    return c #合宿期間を過ぎてしまったらその一つ前の値を返す
n=int(input())
d,x=map(int,input().split())
A=[]
for i in range(n):
    A.append(int(input()))
S=0
for j in range(n):
    S+=choco(A[j],d)
print(x+S)

Submission status: Accepted

Solution code:
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:
_,d,x,*l=map(int,open(0).read().split());print(x-sum(-d//a for a in l))

Submission status: Accepted

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

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

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

    print(cnt)


main()

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 // i + (1 if d % i else 0) for i in 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 i in range(n):
    for j in range(1, d+1, a[i]):
        cnt += 1
print(cnt+x)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

allEatChoco = 0
for i in range(0,n):
    eatChoco = 1
    for j in range(1,102):
        if a[i] * j + 1 <= days:
            eatChoco += 1
        else:
            break
    allEatChoco += eatChoco

print(allEatChoco+lastChoco)

Submission status: Accepted

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

for i in range(N):
    re.append(len(range(0,D,lis[i])))
print(sum(re))

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:
    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 _ in range(N)]

res = X
for i in range(N):
    a = A[i]
    for j in range(100):
        d = a*j+1
        if d <= D:
            res += 1
print(res)

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

Submission status: Accepted

Solution code:
num = int(input())
day, remain = map(int, input().split(' '))
eat_count = 0
for i in range(0, num):
    a = int(input())

    multi = 1
    while True:
        if a > day:
            eat_count += 1
            break
        elif a * multi < day:
            eat_count += 1
        else:
            eat_count += 1
            break

        multi += 1

print(eat_count + remain)

Submission status: Accepted

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

count = 0


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

eat = 0
for _ in range(n):
    check = 1
    while check <= d:
        eat += 1
        check += a[_]
        # print(check,d,a[_])

print(x+eat)

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

print(ans)

Submission status: Accepted

Solution code:
import sys
n = int(input())
d,x = map(int,input().split())
a = tuple(map(int,sys.stdin))
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())
for i in range(n):a=int(input());x+=(d-1)//a+1
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 92, B - chocolate
import itertools

n = int(input())
d, x = map(int, input().split(' '))
A = [int(input()) for i in range(n)]
S = 0

for i in range(n):
    for j in itertools.count(0):
        if j*A[i] + 1 <= d:
            S += 1
        else:
            break

print(x + S)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
count = 0
for i in range(n):
    a1 = int(input())
    count = count + (d-1)//a1 + 1
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 = 0
for i in range(len(a)):
    for j in range(d):
        num = a[i] * j +1
        if num <= d:
            ans+=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)]
for i in range(n):
    k = 0
    count = 0
    while k*a[i]+1 <= d:
        k += 1
        count += 1
    else:
        x += count
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 a in A:
    i = 0
    while True:
        tmp = 1 + i * a
        if tmp <= D:
            count += 1
            i += 1
        else:
            break
print(count+X)

Submission status: Accepted

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

for i in range(0,N):
   Day = []
   for j in range(0,D):
       d = j*A[i] + 1
       if D >= d:
        Day.append(d)
   cnt += len(Day)


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))
ans = X
for i in range(N):
    k = 0
    while k * A[i] + 1<= D:
        k += 1
    ans += k
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 += (d - 1) // a + 1
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_list = []

for i in range(N):
    tmp = 1
    tmp += (D - 1) // A[i]
    ans_list.append(tmp)

ans = X + sum(ans_list)
print(ans)

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 + sum([1 + (D - 1) // ai for ai in A])
print(ans)

Submission status: Accepted

Solution code:
import math

n = int(input())
#a = int(input())
d,x = list(map(int,input().split(" ")))
#ls = list(input().split(" "))
#ls = list(map(int,input().split(" ")))
#a,b,c = list(input().split())
#string = input()
ls = [int(input()) for i in range(n)]

ans = x

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

Submission status: Accepted

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

cnt = 0

for i in li:
    s = d/i
    if s == d//i:
        cnt += d//i
    else:
        cnt += d//i + 1

    
print(cnt+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):
    for j in range(d):
        if j * a[i] + 1 <= d:
            ans += 1
        else:
            break
print(ans)

Submission status: Accepted

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

eCnt = X
for i in range(N):
    tmp = int(input())
    eCnt += 1
    for i in range(tmp + 1, D + 1, tmp):
        eCnt += 1

print(eCnt)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
nums = [int(input()) for _ in range(N)]
cnt = 0
for num in nums:
  idx = 0
  while True:
    if idx * num + 1 > D:
      break
    else:
      cnt += 1
    idx += 1
print(cnt+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
    for j in range (1, 110):
        if j * a + 1 <= d:
            x += 1
        
print(x)

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 += math.ceil(d / a)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

c = [1 + i * j for i in a for j in range(d)]

ans = 0
for i in c:
  if i <= d:
    ans += 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)]
ans = 0
for i in A:
  ans += (D - 1) // i + 1
ans += + X
print(ans)

Submission status: Accepted

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

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:
    iter = 0
    date = 1
    while date <= d:
        choco += 1
        iter += 1
        date = iter * i + 1
print(choco)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
# def LIST(): return list(map(str, input().split()))
# def LIST(): return list(input())

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

ate = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
D,X=map(int,input().split())
A=[int(input()) for i in range(n)]
a=0
for i in range(1,D+1):
  for j in range(n):
    if i* A[j]+1<=D:
      a+=1
print(X+a+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:
    num = 1
    count = 1
    while num <= D:
        num += i
        if num <= D:
            count += 1
        else:
            break
    ans += count
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 ai in a:
    k = 1 + ((d - 1) // ai)
    ans += k
print(ans)