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

ans=0
a=[]
for _ in range(n):
	a.append(int(input()))

Sum=0
for i in range(n):
	day=1
	while True:
		if(day<=d):
			Sum+=1
			day+=a[i]
		else:
			break

print(Sum+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    ans = 0
    for a in As:
        i = 0
        while True:
            if i*a+1 > d:
                break
            ans += 1
            i += 1
    ans += x
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(X + cnt)

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())
eat=0
for _ in range(n):
  a=int(input())
  for i in range(200):
    tmp=i*a+1
    if tmp > d:
      break
    else:
      eat+=1
print(eat+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D_X = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
b = 0
for i in range(N):
    a = 0
    while a*(A[i][0])+1 <= (D_X[0]):
        a = a+1
        b = b+1
print(b+(D_X[1]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def Chocolate(n , d , x , al):

    ans = n + x

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

    return ans

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# Problem B - Chocolate

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

# initialization
day_count = X

# count process
for a in a_list:
    tmp = 1
    while tmp<=D:
        day_count += 1
        tmp += a

# output process
print(day_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 a:
    c = 1
    while True:
        if c <= d:
            ans += 1
            c += i
        else:
            break
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+n
for i in range(n):
    ans+=((d-1)//a[i])

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
A=[int(input()) for i in range(N)]
cnt=0
for i in range(N):
    cnt+=1
    day=1
    for j in range(1,101):
        if D>=j*A[i]+1:
            day=j*A[i]+1
            cnt+=1
        else:
            break
print(cnt+X)

Submission status: Accepted

Solution code:
import math
N=int(input())
D,X=map(int,input().split())
list=[]
for a in range(N):
    A=int(input())
    list.append(A)
answer=0
for a in list:
    answer+=math.ceil(D/a)
print(answer+X)

Submission status: Accepted

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


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


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]
# print(a)
ans = 0
for i in a:
    ans += (d-1)//i
    ans += 1
print(ans+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()))
# 1, Ai+1, 2Ai+1, 3Ai+1
# 1, 3, 5, 7
for i in a:
    a1=0
    for j in range(1,d+1):
        if j==(a1*i+1):
            a1+=1
            x+=1
print(x)

Submission status: Accepted

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

s = [(d-1) // a[i] + 1 for i in range(n)]
print(sum(s) + x)

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

Solution code:
N = int(input())
Day, amari = map(int, input().split())

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

summ = amari

for i in range(N):
    a = consum[i]
    tmp = (Day - 1) // a
    summ += tmp + 1

print(summ)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
l = [int(input()) for i in range(n)]
cnt = 0
for i in range(n):
    t = 1
    while d / t >= 1:
       cnt += 1
       t += l[i]
print(x + cnt)

Submission status: Accepted

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

def eat(c):
    cnt=0
    z=1
    while d>=z:
        cnt+=1
        z=cnt*c+1
    return cnt
ans=0
for i in a:
    ans+=eat(i)
print(ans+x)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

N=int(input())
D,X=map(int,input().split())
A=[0]*N
B=[0]*N
for i in range(N):
  A[i]= int(input())
  B[i]= int(math.ceil(D/A[i]))
  #print(A[i],B[i])
  
print(sum(B)+X)

Submission status: Accepted

Solution code:
#pypyは内包表記使わない, rstrip注意
#提出前に見返すこと！
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 1000000007

    N = int(input())
    D, X = map(int, input().split())
    res = X
    for _ in range(N):
        A = int(input())
        res += (D-1)//A + 1
    print(res)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Thu Mar 12 19:24:47 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

N = ni()
D, X = na()
a = nin(N)

ans = X
for i in range(N):
    ans += 1
    b = a[i]
    while b + 1 <= D:
        ans += 1
        b += a[i]

print(ans)

Submission status: Accepted

Solution code:
from itertools import count, takewhile, accumulate
from functools import reduce

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

print(sum([len(list(takewhile(lambda x: x <= D, map(lambda x: a * x + 1, count())))) for a in A]) + X)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    a = int(input())
    day = 1
    
    while day <= d:
        x += 1
        day += a
        
print(x)

Submission status: Accepted

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():

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

    val=x

    for i in range(n):
        for j in range(d+1):
            if A[i]*j+1<=d:
                val+=1

    print(val)

resolve()

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
# A = [int(input()) for i in range(N)]
for _ in range(N):
    y = int(input())
    div, mod = divmod(D, y)
    X += div
    if mod > 0:
        X += 1
print(X)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
a = a[0]
c = 0

for i in range(a):
	d = list(map(int,input().split()))
	c = c + (b[0] // d[0])
	if (b[0] % d[0]) > 0 :
		c=c+1
      

b=b[1]

print(c+b)

Submission status: Accepted

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

print(ans+X)

Submission status: Accepted

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

cnt = x
for x in a:
    cnt += d // x
    if d % x != 0:
        cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

sum=0
for i in range(N):
    j=0
    while A[i]*j+1<=D:
        sum+=1
        j+=1
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())
    for j in range(1,D+1,a):
        ans+=1
print(ans+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())
    days=1
    while days <=D:
        cnt+=1
        days+=A
        
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC092

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

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

Submission status: Accepted

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

ans=0
for i in range(n):
    a=int(input())
    g=0
    while (a*g+1<=d):
        ans+=1
        g+=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)]
    
num = x

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i in range(n):
    for j in range(1, d+1, a[i]):
        ans += 1 

print(ans + x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

r = x + n
for i in range(n):
    if a[i] <= d:
        r += (d-1)//a[i]
print(r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n  = int(input())
d,x = map(int, input().split())
l = list()
for i in range(n):
    l.append(int(input()))
total = 0
for i in range(n):
    j = 0
    while True:
        if l[i] *j + 1 <= d:
            total += 1
            j += 1
        else:
            break
print(x+total)

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):
    j = 0
    while j * A[i] + 1 < d + 1:
        cnt += 1
        j += 1
print(x + cnt)

Submission status: Accepted

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

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

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 + a - 1) // a for a in A) + X)

Submission status: Accepted

Solution code:
n = int(input())
d, x = (int(x) for x in input().split())
a = []
for _ in range(n): a.append(int(input()))
for a_i in a:
    cnt = 1
    while cnt <= d:
        cnt += a_i
        x += 1
print(x)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    d,x = map(int,input().split())
    a_s = []
    answer = 0
    dp = [[0]*d]*n
    #n人×d日のテーブルを作る
    #作るな
    answer = 0
    for i in range(n):
        a_s.append(int(input()))
    for i in range(n):
        for j in range(d):
            answer += 1 if (j%a_s[i]==0) else 0
    print(answer+x)

main()

Submission status: Accepted

Solution code:
#B - Chocolate
N = int(input())
D, X = map(int, input().split())
A = list(int(input()) for i in range(N))
ans = 0

for i in range(N):
    tmp = 0
    while tmp < D:
        tmp += A[i]
        ans += 1
print(ans+X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
lst = []
lst1 = []
for i in range(n):
    a = int(input())
    lst.append(a)
for j in range(n):
    b = ((d-1)//lst[j])+1
    lst1.append(b)
print(sum(lst1)+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())
ans = x
for _ in range(n):
    a = int(input())
    c = 1
    while c <= d:
        ans += 1
        c += a
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def chocoCounter(a, D):
    choco_cnt = 0
    choco_day = 0
    day = 0
    while True:
        if day == 0:
            choco_day = 1
        else :
            choco_day = (a * day) + 1
        
        if choco_day <= D:
            choco_cnt += 1
        else :
            break
        day += 1
    return choco_cnt

cnt = 0
for i in range(N):
    a = int(input()) # 傾きの大きさ
    cnt += chocoCounter(a, 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)]
for i in range(n):
    x+=(d-1)//(a[i])+1
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt + X)

Submission status: Accepted

Solution code:
N=int(input())
d,x=map(int,input().split())
eaten=0
for i in range(N):
    l=1
    a=int(input())
    while l<=d:
        eaten+=1
        l+=a
total=eaten+x

print(total)

Submission status: Accepted

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

def aaa(D, Ai):
    a = 0
    for i in range(0,D):
        if D >= Ai*i+1:
            a += 1
    return a

y= 0
for j in range(n):
    y += aaa(d, int(input()))

print(y + x)

Submission status: Accepted

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

answer += X
print(answer)

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

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

Submission status: Accepted

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

t = 0
for i in range(1,d+1):
    for j in A:
        if (i - 1) % j == 0:
            t += 1
print(t + x)

Submission status: Accepted

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

Submission status: Accepted

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

ate_cnt = 0
for a in A:
  target_day = 1
  while target_day <= D:
    ate_cnt += 1
    target_day += a

ans = X+ate_cnt
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
D,X=map(int,input().split())
cnt=0
for _ in range(n):
    A=int(input())
    cnt+=1
    t=1
    if A>D: continue
    for i in range(2,D+1):
        if i%(t*A+1)==0:
            cnt+=1;t+=1
print(cnt+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    members = int(input())
    days, lest = map(int, input().split(" "))
    eaten_chocolate = 0
    for _ in range(members):
        eaten_chocolate += (1 + (days - 1) // int(input()))
    print(eaten_chocolate + lest)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

cnt = N
for i, a in enumerate(A):
    n = 1
    while True:
        n += a
        if n > D:
            break
        else:
            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 = n

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

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

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

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for i in range(n)]
c=0
for z in range(n):
    for y in range(101):
        if y*a[z]+1<=d:c+=1
print(x+c)

Submission status: Accepted

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


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

    result = 0
    for s in S:
        result += len(range(1, D + 1, s))
    print(result + X)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

cnt = 0
for i in range(1,N+1):
    for j in range(100+1):
        if j*a[i]+1 <= D:
            cnt += 1
answer = cnt + X
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N=int(input())
D,X=map(int,input().split())
L=list(int(input()) for _ in range(N))
print(sum(math.ceil(D/l) for l in L)+X)

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0
for i in a:
  count += 1
  j = 1 
  while True:
    temp = j * i + 1
    if temp > d:
      break
    else:
      count += 1
      j += 1

count += x
print(count)

Submission status: Accepted

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

# 各参加者がチョコレートを食べる日付を取得してリストへ格納する
al = [0 for _ in range(n)]
for i in range(n):
    al[i] = int(input())

ans = 0
for i in al:
    ans += ((d-1)//i)
    ans += 1

print(ans+x)

Submission status: Accepted

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

# 各参加者がチョコレートを食べる日付を取得してリストへ格納する
al = [0 for _ in range(n)]
for i in range(n):
    al[i] = int(input())

# 1日目が経過した状態にする
ans = n
eat_count = [1 for _ in range(n)]
next_eat = [0 for _ in range(n)]
for i in range(n):
    next_eat[i] = al[i]*eat_count[i]+1
    eat_count[i] = 2

# 2日目以降の食べた個数を求める
for day in range(1, d+1):
    if not(day in next_eat):
        continue

    for i, eat_day in enumerate(next_eat):
        if eat_day == day:
            ans += 1
            next_eat[i] = al[i]*eat_count[i]+1
            eat_count[i] += 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)]
eaten = [((d-1)//a[i])+1 for i in range(n)]
print(sum(eaten)+x)

Submission status: Accepted

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

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())
print(sum((d-1)//int(input())+1 for _ in range(n))+x)

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    d,x=INTM()
    A=[]
    for i in range(n):
        A.append(INT())
    for a in A:
        x+=(d-1)//a+1
    print(x)
if __name__ == '__main__':
    do()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

n = int(input().strip())
d, x = map(int, input().split())
a = [int(input().strip()) for _ in range(n)]
ans = x
for e in a:
    ans += ceil(d / e)
print(ans)

Submission status: Accepted

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

    count = 0
    for i in a:
        m = 0
        while i * m + 1 <= d:
            m += 1
        count += m

    print(count + x)

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
a = int(input())
b,c = map(int, input().split())
l=[int(input()) for i in range(a)]

sum = c

for i in l:
  if b%i != 0:
    sum += b // i + 1
  else:
    sum += b // i
    
print(sum)

Submission status: Accepted

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