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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(x + ans)

Submission status: Accepted

Solution code:
# ABC 092: B – Chocolate
n = int(input())
d, x = [int(s) for s in input().split()]
a = [int(input()) for _ in range(n)]

chocorates = 0

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

print(chocorates + x)

Submission status: Accepted

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


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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

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

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

print(total)

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt+x)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans + x)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#                         author:  kagemeka 
#                         created: 2019-11-07 00:57:57(JST)
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator

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


if __name__ == "__main__":
    # execute only if run as a script
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(res)

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

Submission status: Accepted

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

Submission status: Accepted

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

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(((D-1) // A).sum() + N + 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())
    b=1
    while b <= d:
        cnt +=1
        b +=a

print(cnt+x)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count + X)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(N):
    A=int(input())
    for j in range(1,D+1,A):
        ans+=1
print(ans)

Submission status: Accepted

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

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

# solve
ans = [0] * D
for i in range(N):
    d = 1
    c = 1
    while d <= D:
        ans[d - 1] += 1
        d = c * A[i] + 1
        c += 1

# output
print(sum(ans) + X)

Submission status: Accepted

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

Submission status: Accepted

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

for n 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())
r = D-1
sum = N+X
for _ in range(N):
  sum += r//int(input())
print(sum)

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

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

print(c+X)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(X)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
    if D % i == 0:
        ans += D // i
    else:
        ans += D // i + 1

print(ans + X)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

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

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

print(X + n_eaten_choco)

Submission status: Accepted

Solution code:
import sys

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

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

main()

Submission status: Accepted

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

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

print(X)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    slove()

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,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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

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

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

if  __name__=='__main__':
    main()

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
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

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

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

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):
    interval = 0
    while True:
        if 1 + A[i] * interval <= D:
            cnt += 1
            interval += 1
        else:
            break
print(cnt+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
from functools import reduce
import copy
import math
from pprint import pprint


sys.setrecursionlimit(4100000)


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


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


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

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

    return choco


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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(sum1+X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    print(c+x)

bb092()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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


print(sum(num_eat_list) + dif_num)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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(100):
        if a[i]*j+1<=d:c+=1
        else:break
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:
# ABC092 B - Chocolate
n = int(input())
d,x = map(int, input().split())
a = []

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(sum(B)+X)

Submission status: Accepted

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

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

Submission status: Accepted

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

personCount = int(input())
(days, remain) = [int(i) for i in input().rstrip().split(" ")]

eatList = [int(input()) for i in range(personCount)]

eatCount = [0 for i in range(days + 1)]

for i in eatList:
    current = 1
    while(current < len(eatCount)):
        eatCount[current] += 1
        current += i

print(sum(eatCount) + remain)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def count(num,d):
    bite=0
    date=1
    while date<=d:
        bite+=1
        date+=num
    return bite

n=int(input()) #人数
d,x=map(int,input().split()) #日数、のこった数
ans=x
for i in range(n):
    num=int(input())
    ans+=count(num,d)
print(ans)

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

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

ans = x

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

print(ans)

Submission status: Accepted

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

ans = N + X
for n in range(N):
    ans += len(list(filter(lambda x: x <= D, [i*A[n] + 1for i in range(1, D+1)])))
print(ans)

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().strip())
D,X = map(int, input().strip().split(' '))
A = [int(input().strip()) for _ in range(N)]

ans = 0
for a in A:
  now = 1
  while True:
    if now > D: break
    ans += 1
    now += a
    
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()))


counter = 0

for i in A:
  j = i
  # counter +=1
  # j = 2 * j + 1
  r = i
  y = 1
  counter +=1
  while r <= D:
    # print(r)
    r = j * y + 1
    y += 1
    if r <= D:
      counter+=1



# print("_______________________")
print(counter + 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())
ans = n + x
for i in range(n):
  ans += (d-1) // int(input())
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D, X= map(int, input().split())
A = [0] * N
total = 0
for i in range(N):
  A[i] = int(input())
  total += (D-1)//A[i]+1
print(total + 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 A:
  day = [j*i+1 for j in range((D-1)//i+1)]
  ans += len(day)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

sum=0
for i in range(N):
    num=0
    for j in range(N*D*2):
        if j*A[i]+1<=D:
            num+=1
        else:
            sum+=num
            break

print(sum+X)

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in A:
    chocolate += (D - 1) // i + 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)]
eaten = 0
j = 0
for i in range(n):
    while 1+a[i]*j <= d:
        j += 1
        eaten += 1
    j = 0
print(x+eaten)

Submission status: Accepted

Solution code:
# ABC092b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

ans = x
for i in range(1, n+1):
    for j in range(1, d + 1, a[i - 1]):
        #print(i, j)
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
total = x
for i in range(n):
    y = int(input())
    total += 1
    for j in range(1, 100):
        current = y * j + 1
        if current <= d:
            total += 1
        else:
            break
print(total)

Submission status: Accepted

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