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

Submission status: Accepted

Solution code:
#abc092b

n=int(raw_input())
d,x=map(int,raw_input().split())
a=[]
for i in xrange(n):
 a.append(int(raw_input()))
s=[]
for i in xrange(n):
 y=d/a[i]+1
 if d%a[i]==0:
  y-=1
 s.append(y)
res=sum(s)+x
print res

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def inpl(): return list(map(int, input().split()))
N = int(input())
D, X = inpl()
A = [int(input()) for i in range(N)]

chocos = [0]*D

for a in A:
    for i in range(0, D, a):
        chocos[i] += 1

print(sum(chocos) + X)

Submission status: Accepted

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

Submission status: Accepted

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

ans = X
for i, a in enumerate(A):
    y = (D - 1) // a + 1
    ans += y
print(ans)

Submission status: Accepted

Solution code:
import math

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

def solve():
    ans = X
    for A_i in A:
        ans += math.ceil(D/A_i)
    print(ans)

solve()

Submission status: Accepted

Solution code:
N = int(input()) #N = 3
D, X = map(int, input().split()) #D = 7, X = 1
A = [int(input()) for i in range(N)] #A = [2,5,10]

choco = 0
for days in range(N):
    Ai = A[days]
    eatDay = 1
    while eatDay <= D:
        choco += 1
        eatDay += Ai

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)]
ans = 0
for i in range(N):
    ans += (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:
    ans += (d+i-1) // i
print(ans)

Submission status: Accepted

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

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

sum_choco = 0

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

sum_choco += x

print (sum_choco)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split(" "))
temp = 1
ans = 0 
for i in range(N):
    A = int(input())
    while temp <= D:
        ans += 1
        temp += A
    temp = 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):
    p=int(input())
    ans += (d-1)//p + 1

print(ans+x)

Submission status: Accepted

Solution code:
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input())) 
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    d,x = LI()
    a = [I() for _ in range(n)]
    r = [0] * (d+1)
    r[0] = x
    for c in a:
        for i in range(1,d+1,c):
            r[i] += 1


    return sum(r)


print(main())

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())
for i in range(N):
    for j in range(1, D+1, int(input())):
        X += 1
print(X)

Submission status: Accepted

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

# 人数
psn_cnt = int(input())

# 日数と最終日の余り
date_amari = input()
# 分割
da_list = date_amari.split()
date = int(da_list[0])
amari = int(da_list[1])

# 人数分の入力値を取得
psn_list = []
for i in range(psn_cnt):
	psn_list.append(int(input()))

choco_cnt_list = []
# 人数分のループ
for i in range(psn_cnt):
	# チョコ数の初期化
	choco_cnt = 0
	# 日数+1のループ
	for j in range(date + 1):
		# 条件に当てはまる数値が日数を超えていなければその人のチョコを+1
		if date >= psn_list[i] * j + 1:
#			print(str(i) + "add")
			choco_cnt += 1
		# 条件に当てはまる数値が日数を超えたところでその人のチョコ数をリストに詰めて次の人へ
		else:
			choco_cnt_list.append(choco_cnt)
#			print(str(i) + "added" + str(choco_cnt))
			break
# 全員のチョコ数を合計して余りも足す
choco_sum = 0
for choco_cnt in choco_cnt_list:
	choco_sum += choco_cnt
choco_sum += amari

print(choco_sum)

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline())
d,s = map(int,stdin.readline().split())
for _ in xrange(n):
 x = int(stdin.readline())
 st = 1
 while st <= d:
  s+=1
  st += x
print s

Submission status: Accepted

Solution code:
# -*-*-*- coding: utf-8 -*-*-*-
member = int(input())
days, choco = map(int, input().split())
ans = choco
 
for i in range(member):
    num = int(input())
    ans += (days - 1) // num + 1
#    print(i, 'day : eat = {} // {} = {:2}, ans = {:2}'.format(days, num, (days // num + 1), ans))
 
print(ans)

Submission status: Accepted

Solution code:
# -*-*-*- coding: utf-8 -*-*-*-
member = int(input())
days, choco = map(int, input().split())
ans = choco

for i in range(member):
    num = int(input())
    if days % num == 0:
        ans -= 1
    ans += days // num + 1
#    print(i, 'day : eat = {} // {} = {:2}, ans = {:2}'.format(days, num, (days // num + 1), ans))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(r)

Submission status: Accepted

Solution code:
n = int(input())
day, choco = map(int,input().split())
P = [int(input()) for _ in range(n)]
ans = choco + n
for i in range(n):
    p = day // P[i]
    if day % P[i] == 0:
        p -= 1
    if p > 0:
        ans += p
print(ans)

Submission status: Accepted

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

B=0

choco=0
for y in range(N):
    for x in range(0,D,A[y]):
        choco=choco+1
        B=B+1

choco=choco+X

print(choco)

Submission status: Accepted

Solution code:
N = int(input())

inp = list(map(int, input().split()))
D = int(inp[0])
X = int(inp[1])

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

ans = X

for i in range(D):
  j = 0
  while (j <= N - 1):
    # 1日目
    if i == 0:
      ans += 1
    else:
      # 2日目以降
      if i * A[j] + 1 <= D:
        ans += 1
        
    j += 1

print (ans)

Submission status: Accepted

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

a = [int(input()) for i in range(0, n)]

ans = x

for i in range(0, n):
    day = 1

    while day <= d:
        ans += 1
        day += a[i]


print(ans)

Submission status: Accepted

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

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

k = []
ans = X + N

for i in range(N):
    k.append(0)
    while 1:
        if 1 + k[i] * A[i] > D:
            k[i] -= 1
            break
        else:
            k[i] += 1
    ans += k[i]

print str(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(sum + N + X)

Submission status: Accepted

Solution code:
N = int(input())
DX = input().split(' ')
D,X = int(DX[0]),int(DX[1])

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

lis = []
for i in range(len(A)):
    x = 1
    while x <= D:
        lis.append(x)
        x += A[i]

print(len(lis)+X)

Submission status: Accepted

Solution code:
n = int(raw_input())
d,x= map(int, raw_input().split())
a = [int(raw_input()) for i in range(n)]
re = int()
for ai in a:
    for i in range(d):
        if (i*ai)+1 <= d:
            re+=1
print re+x

Submission status: Accepted

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

Submission status: Accepted

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

result = int(X)
temp_D  = int(D) - 1
for _ in range(N):
  A = int(input())
  result += temp_D //A
result += N

print(result)

Submission status: Accepted

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

for i in range(N):
	A_i = int(input())
	day = 1
	while(day <= D):
		day += A_i
		X += 1

print(X)

Submission status: Accepted

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

result = int(X)
temp_D  = int(D) - 1
for _ in range(N):
  A = int(input())
  result += math.floor(temp_D/A)
result += N

print(result)

Submission status: Accepted

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

for a in A:
    t = 0
    while (t*a + 1) <= D:
        C += 1
        t += 1

print(C+X)

Submission status: Accepted

Solution code:
n = int(input())
num = input().split()
a = [input() for i in range(n)]
ans = 0

for i in a:
    ran = (int(num[0])-1) // int(i)
    ans = ans + ran
ans = ans + n + int(num[1])
print(ans)

Submission status: Accepted

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

total = x
for i in a_l:
    for j in range(d):
        if j * i + 1 <= d:
            total += 1
print(total)

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(int, input().split()))
d, x = nums[0], nums[1]

a = []
for i in range(n):
  a.append(int(input()))

num_choco = []
for i in range(n):
  nc = 0
  for j in range(d):
    if 1+a[i]*j <= d:
      nc += 1
    else:
      break
  num_choco.append(nc)
print(sum(num_choco)+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
DX = input().split()
D=int(DX[0])
X=int(DX[1])
a =[input() for i in range(N)]

sam = N + X
i= 1
n=0
while n < N:
    if 1 + i * int(a[n])  < D+1:
        sam += 1
        i += 1
    else:
        n += 1
        i = 1

print(sam)

Submission status: Accepted

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

for i in range(N):
    x = int(input())
    choco += day // x
    if day % x != 0:
        choco += 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)]
ANS = X
for i in range(N) :
  ANS += (D - 1) // A[i] + 1
print(ANS)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

days=[math.ceil(D/i) for i in A]
print(X+sum(days))

Submission status: Accepted

Solution code:
# -- coding: utf-8 --
N = int(input())
day, x = map(int, input().split(' '))
duration_list = list(map(int, [input() for _ in range(N)]))
choco = [(day - 1) // i + 1 for i in duration_list]
print(x + sum(choco))

Submission status: Accepted

Solution code:
parsons = int(input())
days, remaining_ammount = list(map(int, input().split()))
terms = [int(input()) for i in range(parsons)]

ans = parsons

for i in terms:
    cnt = i
    while 1 + i <= days:
        if True:
            ans += 1
            i += cnt

print(ans + remaining_ammount)

Submission status: Accepted

Solution code:
try:
    n = int(input().strip())
    (d,x) = input().strip().split(" ")
    max = 0 
    for i in range(n):
        f = int(input().strip())
        for m in range(100):
            day=(m*f)+1
            if day > int(d):
                break
            max+=1        
    max+=int(x)
    print(max)
except EOFError:
    pass

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b,c=map(int,input().split())
d=0
while d<a:
  e=((b-1)//int(input()))+1
  c+=e
  d+=1
print(c)

Submission status: Accepted

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

total = X + sum(A)
print(total)

Submission status: Accepted

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

for i in range(N):
    j = 0
    while j*A[i] + 1 <= D:
        j += 1
    else:
        fin = fin + j

print(fin + X)

Submission status: Accepted

Solution code:
from itertools import product
N = int(input())
D, X = map(int, input().split())

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

cnt = 0
for d, a in product(range(1, D + 1), A):
    if (d - 1) % a == 0:
        cnt += 1

print(X + cnt)

Submission status: Accepted

Solution code:
def main():
    Num = int(input())
    Days, RemeinChoco = [int(i) for i in input().split()]
    
    A =[]
    for i in range(Num):
        A.append(int(input()))
    
#    print(A)
    
    EatChocoNum = Num + RemeinChoco
    for i in range(Num):
        EatChocoNum += int((Days - 1)/A[i])
    
    print(EatChocoNum)
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
member = int(input())
param = input().split()
day = int(param[0])
rest = int(param[1])

choco = []
for m in range(member):
    span = int(input())
    eat = 0
    for d in range(0,day,span):
        eat += 1
#         print(eat, d)
    choco.append(eat)
#     print(choco)

print(sum(choco, rest))

Submission status: Accepted

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

    ans.append(work)

print(sum(ans))

Submission status: Accepted

Solution code:
p = int(input())
dr = input().split(' ')
d, r = int(dr[0]), int(dr[1])


for i in range(p):
    nb = int(input())
    if nb == 1:
        r += d
    else:
        if d % nb == 0:
            r += d/nb
        else:
            r += (d//nb) +1

print(int(r))

Submission status: Accepted

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

print(X)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    D, X = [int(x)for x in stdin.readline().rstrip().split()]
    Ai = [int(stdin.readline().rstrip()) for _ in range(N)]
    spam = [[k for k in [Ai[i] * j + 1 for j in range(D)] if k <= D] for i in range(N)]
    ham = sum([len(x) for x in spam])
    print(ham + X)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = input().split(" ")
D = int(A[0])
X = int(A[1])


sum = X
list = []



for i in range(N):
    eat = int(input())
    day = 1

    while True:
        if(day > D):
            break
        day += eat
        sum += 1


print(sum)

Submission status: Accepted

Solution code:
N = int(input())
DX = input().split()
A = [input() for i in range(N)]
D = int(DX[0])
X = int(DX[1])
A = [ int(x) for x in A]
#print(N, D, C, A)
ANS = [0 for i in range(N)]
for i in range(N):
    for j in range(D):
        if D >= (j * A[i] + 1):
            ANS[i] +=  1


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

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = []
s = 0

for i in range(n):
    a.append(int(input()))

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

Submission status: Accepted

Solution code:
N=int(input())
D,X=list(map(int,input().split(" ")))
A=[]

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

S=0
  
for i in range(N):
  for j in range(1000):
    if (1+j*A[i])>D:
      S+=j
      break
  
print(S+X)

Submission status: Accepted

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

ans=x

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

print(ans)

Submission status: Accepted

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

ans = 0

for t in range(1, d+1):
    for ai in a:
        if ai == 1:
            ans += 1
        elif t == 1 or t%ai==1:
            ans += 1
print(ans+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p = int(input())
data = list(map(int,input().split()))
al = data[1]
for i in range(p):
  k = int(input())
  if k < data[0] +1:
    al += ((data[0] - 1)// k + 1)
  else:
    al += 1
  k = 0
print(al)

Submission status: Accepted

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

result = X
for i in range(N):
    A = int(input())
    if A == 1:
        result += D
        continue
    if A < D:
        result += 1 + (D - 1) // A
        continue
    result += 1

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def eat(a,day):
    count = 0
    i = 0
    while(True):
        if i == 0:
            count = count + 1
        elif i*a +1 <= day:
            count = count + 1
        else:
            break
        i = i + 1
    return count

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

eatcounts = 0
for i in range(N):
    eatcounts = eatcounts + eat(A[i],dn[0])

eatcounts = eatcounts + dn[1]
print(eatcounts)

Submission status: Accepted

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

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
for ai in a:
    cnt=int((d-1)/ai)+1
    ans+=cnt
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()))

choco = x
for i in range(n):
    for day in range(d):
        if a[i]*day+1 < d+1:
            choco += 1
print(choco)

Submission status: Accepted

Solution code:
# your code goes here
people = int(input())
day,left = map(int,input().split())

interval = [int(input()) for i in range(people)]
ans = left

for i in range(people):
	ans += (day-1)//interval[i] + 1
	
print(ans)

Submission status: Accepted

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

    choco = 0
    for i in A:
        j = 0
        n = 0
        while 1:
            n = i * j + 1
            j += 1
            if n > D:
                break
            choco += 1
    print(choco + X)

main()

Submission status: Accepted

Solution code:
N=int(input())
a=input().split()
D=int(a[0])
X=int(a[1])
m=0
sum=0
for i in range(N):
  A=int(input())
  m=int((D-1)/A)+1
  sum =sum+m
print(sum+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())
    c = 0
    while 1+c*A<=D:
        ans += 1
        c += 1
    
print(ans+X)

Submission status: Accepted

Solution code:
import numpy

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

num = 0
for i in range(N):
 num=num+numpy.ceil(D/float(a[i]))

print int(num)+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)]

sum = 0
for j in a:
  sum += (D-1)//j
print(X + N + sum)

Submission status: Accepted

Solution code:
#1. input
# map and zip, split()
N = int(input())
D, X = map(int, input().split())
A = [0]*N
for i in range(N):
    A[i] = int(input())


#2. count how many chocolates each member ate
choco_eaten = [0]*N
for i in range(N):
    day = 1
    while day <= D:
        choco_eaten[i] = choco_eaten[i] + 1
        day = day+A[i]


#3. output
print(X + sum(choco_eaten))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    D,X = map(int,input().split())
    A_L = [int(input()) for i in range(N)]
    eat_L = [int((D-1)/A_L[k])+1 for k in range(N)]
    
    print(sum(eat_L)+X)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
import sys
n = int(input())
d, x = map(int, input().split())
#s = input()
i=0
for line in sys.stdin:
     x += (d-1) // (int(line)) +1 
# 出力
print("{}".format(x))

Submission status: Accepted

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

def f(a):
    return (D-1)//a + 1

sums = sum(list(map(f, A)))
print(sums + X)

Submission status: Accepted

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

for n in range(N):
    a = int(input())
    X += D//a + 1

print(X)

Submission status: Accepted

Solution code:
# coding : utf-8

import numpy as np

N = int(input())
D =input().split()
X = int(D[1])
D = int(D[0])

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

for a in A:
    for i in range(D):
        if i*a + 1 <= D:
            suml += 1
        else:
            break
print(suml+X)

Submission status: Accepted

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

a = []
for i in range(n):
    a.append(int(input()))

count = x

for i in range(n):
    j = 0
    while d >= j * a[i] + 1:
        count += 1
        j += 1


print(count)

Submission status: Accepted

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

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

print(ans+X)

Submission status: Accepted

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

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

    print(total)

Submission status: Accepted

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

count = 0
for Ai in A:
    temp = D // Ai
    if D % Ai == 0:
        count += temp
    else:
        count += 1 + temp

print(X + count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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


# solve
t = 0
for i in range(N):
    j = 0
    while (True):
        if (1+j*A[i] <= D):
            t += 1
            j += 1
        else:
            break

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

Submission status: Accepted

Solution code:
n=int(input())
x=input()
x=x.split()
d=int(x[0])
x=int(x[1])
o=0
for i in range(n):
  a=int(input())
  b=0
  c=0
  while (c*a+1)<=d:
    o+=1
    c+=1
    
o+=x
print(str(o))

Submission status: Accepted

Solution code:
n = int(input())
d, pieces = map(int, input().split())
a = [int(input()) for _ in range(n)]
for ai in a:
    j = 1
    pieces += 1
    while (j * ai) + 1 <= d:
        pieces += 1
        j += 1
print(pieces)

Submission status: Accepted

Solution code:
#coding:utf-8

N = int(raw_input())

tmp = map(int, raw_input().split())
D = tmp[0]
X = tmp[1]

total = 0
for i in range(N):
    current = int(raw_input())
    each = (D - 1) / current
    each += 1
    total += each
    
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)]

def choco(t):
    k=0
    while(1):
        s=k*t+1
        if s>d: break
        k+=1
    return k

T=[]
for i in A:
    T.append(choco(i))

print(sum(T)+x)

Submission status: Accepted

Solution code:
num = int(input())

tmp = input().split()

day = tmp[0]

last = tmp[1]

total = int(last)

for i in range(num):
    now = 1

    up = int(input())
    
    while now <= int(day):
        total += 1
        now += up

print(total)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


def get_input():
    while True:
        try:
            yield input()
        except EOFError:
            break

N = int(input())
D, X = map(int, input().split(' '))
A = list(map(int, get_input()))
Y = X

for A_i in A:
    n = 0
    while n * A_i + 1 <= D:
        Y += 1
        n += 1

print(Y)

Submission status: Accepted

Solution code:
def main():
    n = int(input()) 
    d, x = (int(i) for i in input().split())
    a = [int(input()) for i in range(n)]
    tot = x
    for i in a:
        m = d % i
        if (m==0):
            tot+=int(((d-m)/i))
        else:    
            tot+=int(((d-m)/i)+1)
    print(tot)
    
main()

Submission status: Accepted

Solution code:
N = int(input())
LST = input().split(" ")
D = int(LST[0])
X = int(LST[1])

a = 0
a += X
if D != 0:
    a += N

for i in range(N):
    d = int(input())
    a += int(D/d)
    if D%d ==0:
        a -= 1
        
print(a)

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

for a in A:
    cnt = 0
    c = 0
    while c <= d:
        cnt += 1
        c = cnt*a+1
        ans += 1
    
    
ans += x

print(ans)

Submission status: Accepted

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

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

    c = 0
    for _ in range(n):
        a = int(input())
        for b in range(0,100):
            if a * b + 1 <= d:
                c += 1
            else:
                break

    print(c + x)

if __name__ == '__main__':
    main()