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 python
# coding: utf-8

# In[8]:


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


# In[9]:


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


# In[ ]:

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
for i in range(n):
  a=int(input())
  temp=1
  x=x+1
  while a*temp+1<=d:
    x=x+1
    temp=temp+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()))

k = []
for i in range(n):
    count = 0
    day = d
    while True:
        day -= (count * a[i]) + 1
        if day >= 0:
            count += 1
            day = d
        else:
            k.append(count)
            break
total = sum(k) + x
print(total)

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:
_,d,x,*a=map(int, open(0).read().split())
print(sum(~-d//i+1 for i in a)+x)

Submission status: Accepted

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


def solve(N: int, D: int, X: int, A: "List[int]"):
    chocolates = []
    for a in A:
        chocolates.append(search(D, a))
    print(sum(chocolates) + X)
    return


def search(day: int, ai: int):
    ans = 0
    for i in range(day):
        if i * ai + 1 <= day:
            ans += 1
    return ans


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, D, X, A)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    ans = X
    for a in A:
        q, r, = divmod(D - 1, a)
        ans += q + 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

count = 0
for a in A:
    count += math.ceil(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)]
ans = x
for i in range(n):
    ans+=(d-1)//a[i]+1
print(ans)

Submission status: Accepted

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

C = [0]*D
for a in A:
    n = 0
    while a*n < D:
        C[a*n] += 1
        n += 1
print(sum(C)+X)

Submission status: Accepted

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

ans = 0

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

print(ans + x)

Submission status: Accepted

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

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

eated = 0

for i in range(len(A)):
    if A[i] == 1:
        eated += D
    elif D % A[i] == 0:
        eated += D // A[i]
    else:
        eated += D // A[i] + 1

print(X + eated)

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:
	j = 0
	while True:
		if (i*j+1) > D:
			break
		ans += 1
		j += 1

print(ans+X)

Submission status: Accepted

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

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

print(X + sum(ate_amount))

Submission status: Accepted

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

cnt = 0
day = 1
for i in range(n):
	while day <= d:
		day += a[i]
		cnt += 1
	x += cnt
	cnt = 0
	day = 1

print(x)

Submission status: Accepted

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

def chococount(a,d):
  c=d//a
  if d%a!=0:
    c+=1
  return c
  
choco=X
for i in range(N):
  A=int(input())
  choco+=chococount(A,D)

print(choco)

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, d + 1):
        if a[i] == 1:
            c += 1
        elif j % a[i] == 1:
            c += 1
print(c + x)

Submission status: Accepted

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

Submission status: Accepted

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

buf = 0
for i in A:
  buf+=(D-1)//i+1
print(X+buf)

Submission status: Accepted

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

for i in A:
    day = i
    d = 1
    while day <= D:
        day = d*i+1
        d += 1
        if day <= D:
            sum += 1
        else:
            break

sum += X
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()))
ans = n + x
d -= 1
for a in A:
	ans += d // a
print(ans)

Submission status: Accepted

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

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    d, x = mi()
    L = [ii() for _ in range(n)]
    cnt = x
    for elm in L:
        cnt += 1 + (d - 1) // elm
    print(cnt)


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

for i in range(n):
    a=int(input())
    while True:
        if day>d:
            break
        ans+=1
        day+=a
    day=1
print(ans+x)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    count = 0
    for num in num_list:
        if d // num > 0 and d % num == 0:
            count += d // num
        elif d //num >0:
            count += d // num + 1
        else:
            count += 1

    ans = count + x

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = x

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

print(ans)

Submission status: Accepted

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

ans = 0

for a in range(n):
    day = 1
    while day <= d:
        ans += 1
        day += A[a]

print(ans+x)

Submission status: Accepted

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

print(ans + 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-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)]
choco = 0
for i in a:
    default = 1
    num = 0
    while default <= d:
        default += i
        num += 1
    choco += num
print(choco + x)

Submission status: Accepted

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

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


print(x)

Submission status: Accepted

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

for i in range(A):
  day = 1
  while d >= day:
    count += 1
    day = day + a[i]
    
    
print(count + x)

Submission status: Accepted

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


def read():
    N = int(input().strip())
    D, X = map(int, input().strip().split())
    A = []
    for i in range(N):
        a = int(input().strip())
        A.append(a)
    return N, D, X, A


def solve(N, D, X, A):
    count = [0 for i in range(D+1)]
    for a in A:
        i = 0
        while True:
            day = i * a + 1
            if day > D:
                break
            count[day] += 1
            i += 1
    return X + sum(count)


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = X
for _ in range(N):
    A = int(input())
    a = 0
    x = 0
    while (x * A + 1 <= D):
        a += 1
        x += 1
    ans += 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)]
b=[d//a[i] for i in range(n)]
c=0
for i in range(n):
	if b[i]==d:
		c += b[i]
	elif d%a[i]==0:
		c += b[i]
	else:
		c += b[i]+1
print(c+x)

Submission status: Accepted

Solution code:
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


N = inp()
D, X = inlist()
A = []
K = [0] * N
for i in range(N):
    A.append(inp())


for i in range(N):
    for d in range(D):
        eaten_at = d*A[i] + 1
        if eaten_at <= D:
            K[i] += 1
print(sum(K)+X)

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

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

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

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

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


#############
# Main Code #
#############

N = inputI()
D,X = inputIL()
A = inputILs(N)

C = sum([(D-1)//a + 1 for a in A])

print(C+X)

Submission status: Accepted

Solution code:
import math
from collections import deque
from collections import defaultdict

#自作関数群
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

n = readInt()
d,x = readInts()
a = []
for i in range(n):
	a.append(readInt())

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

print(x+ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for _ in range(n):
    a = int(input())
    ans += len(day[1:d+1:a])
print(ans + x)

Submission status: Accepted

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

Submission status: Accepted

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

print(x+c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
D,X = II()
A = [I() for _ in range(N)]

for a in A:
  cnt = 0
  d = 1
  while True:
    if D >= d:
      cnt += 1
      d += a
    else:
      break
  X += cnt
print(X)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

#N人、D日　それぞれk*Ai(0-index)日目にチョコを食べる。
#消費したチョコの数＋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())
    add = (d+a-1)//a
    ans += add
print(ans + x)

Submission status: Accepted

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

print(ate+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())
    j = 0
    while j*a+1 <= D:
        A += 1
        j += 1

print(A+X)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

res = 0

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

print(res + x)

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def solve(A, d, x):
    B = [0] * d
    for i in range(d):
        for a in A:
            if i % a == 0:
                B[i] += 1
    return sum(B) + x

def main():
    n = int(input())
    d, x = map(int, input().split())
    A = []
    for i in range(n):
        A.append(int(input()))
    print(solve(A, d, x))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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(d):
    if a * j >= d:
      break
    ans += 1
print(ans)

Submission status: Accepted

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

ans = n
for a in a_list:
    i = 1
    tmp = i * a + 1
    while tmp <= d:
        ans += 1
        # 次の日
        i += 1
        tmp = i * a + 1


print(ans + 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())
  if(D % A == 0):
    ans = ans + (D // A)
  else:
    ans = ans + ((D // A) + 1)
print(str(ans + X))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 17:51:20 2020

@author: shinba
"""

n = int(input())
d,x = map(int,input().split())
cnt1 = 0
for i in range(n):
    a = int(input())
    cnt2 = 0
    while cnt2*a+1 <= d:
        cnt2 += 1
        cnt1 += 1

print(x+cnt1)

Submission status: Accepted

Solution code:
#S= str(input())
#T= str(input())
N = int(input())
D,X = map(int,input().split())

#A = list(map(int,input().split()))
c=0
for i in range(N):
    a=int(input())
    t=0
    while 1+t*a<=D:
        c+=1
        t+=1
print(c+X)

Submission status: Accepted

Solution code:
#S= str(input())
#T= str(input())
N = int(input())
D,X = map(int,input().split())

#A = list(map(int,input().split()))
c=0
for i in range(N):
    a=int(input())
    t=0
    while t*a<D:
        c+=1
        t+=1
print(c+X)

Submission status: Accepted

Solution code:
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0

n = iin()
d,x = map(int,input().split())
for i in range(n):
    a = iin()
    for j in range(d):
        if a * j + 1 > d:
            break 
        x = x + 1
print(x)

Submission status: Accepted

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

ans = N + X

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()