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: Wrong Answer

Solution code:
import sys

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

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

    print(c + X)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

for i in range(1, N + 1):
  X += D // i

print(X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def ceil(i):
    if int(i) == i:
        return i
    else:
        return int(i)+1


N = int(input())
D, X = map(int, input().split())
L = []
ans = 0
for _ in range(N):
    x = int(input())
    ans += ceil(D / x)
print(ans+X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def main():
    """Function."""
    n = int(input())
    d, x = map(int, input().split())
    a = [int(input()) for _ in range(n)]

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

res = 0
for e in a:
    i = 0
    while e*i+1 <= d:
        print(e*i+1)
        res += 1
        i += 1

print(res+x)

Submission status: Wrong Answer

Solution code:
N = int(input())
D, X = map( int, input().split())
A = list()
chocoX = 0

for i in range(N):
  a = input()
  A.append(a)
    
for j in range(N):
  chocoX += ((D // int(A[j])) + 1)
    
print(chocoX + X)

Submission status: Wrong Answer

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

c = 0
for i in a:
    c += d//i
print(c+n)

Submission status: Wrong Answer

Solution code:
#人数
N = input()
#合宿D日、最後に残ったチョコX
D,X = input().split()
A = []
for i in range(int(N)):
    A.append(input())
x  = int(N)
for a in A:
    x += int((int(D)-1)/int(a))
    print("---"+D+"/"+a+"=",int(int(D)/int(a)))
print(x+int(X))

Submission status: Wrong Answer

Solution code:
#人数
N = input()
#合宿D日、最後に残ったチョコX
D,X = input().split()
A = []
for i in range(int(N)):
    A.append(input())
x  = int(N)
for a in A:
    x += int(int(D)/int(a))
print(x+int(X))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

ans = X

for i in range(1, D+1):
    for j in A:
        if i % j == 1:
            ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

sum_c = 0
for _ in range(N):
    A = int(input())
    choco = 0
    for i in range(1, 100):
        choco += 1
        day = i * A + 1
        if day > D:
            break
    sum_c += choco
print(sum_c + X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 + d//a[i]
print(cnt)

Submission status: Wrong Answer

Solution code:
"""
https://abc092.contest.atcoder.jp/tasks/abc092_b
"""
n=int(input())
[d,x]=[int(i) for i in input().split()]
a=[]
for i in range(n):
    a.append(int(input()))
b=0
t=1
for j in range(n):
    for i in range(d):
        if t>d:
            t=1
            b=b-1
            break
        else:
            t=i*a[j]+1
            #print(t)
            b=b+1
print(b+x)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 0
for k in range(n):
    count += int(d/times[k]) + 1

print(count + x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(raw_input())
D,X=map(int,raw_input().split())
A=[int(raw_input()) for i in xrange(N)]
print X+sum([D/ai for ai in A])

Submission status: Wrong Answer

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

count = X
for i in range(N):
  count += int(D/int(input()))+1

print(count)

Submission status: Wrong Answer

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

for i in range(n):
    a = int(input())
    b = int(d/a)
    if a==1:
        counter += b
    else:
        counter += b+1
    
print(counter+x)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
d, x= map(int, input().split())
a = []
for i in range(n):
    a.append(int(input()))
# n = 5
# d, x = 30, 44
# a = [26,18,81,18,6]
choco = n+x

for A in a:
    j = 0
    while (j+1)*A+1 < d:
        print("A:%s, j:%s" % (A,j+1))
        print((j+1)*A+1)
        choco += 1
        j += 1
print(choco)

Submission status: Wrong Answer

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

for A in a:
    j = 0
    while (j+1)*A+1 <= d:
        print("A:%s, j:%s" % (A,j+1))
        print((j+1)*A+1)
        choco += 1
        j += 1
print(choco)

Submission status: Wrong Answer

Solution code:
n = int(input())
d, x= map(int, input().split())
a = []
for i in range(n):
    a.append(int(input()))
# n = 3
# d, x = 7, 1
# a = [2, 5, 10]
choco = n+x

for A in a:
    j = 0
    while (j+1)*A+1 <= d:
        print("A:%s" % A)
        print((j+1)*A+1)
        choco += 1
        j += 1
print(choco)

Submission status: Wrong Answer

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

#print('N,D,X',N,D,X)
sum=0

for i in range(N):
    for j in range(100):
        tmp = j*A[i]+1
#        print('i,j,tmp',i,j,tmp)
        if tmp>D:
            sum+=(j)
#            print('sum',sum)
            break

print(X+sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

m=[]
for i in range(n):
    if d%a[i]==0:
        m.append(int(d/a[i]))
    else:
        m.append(int(d/a[i]+1))
    print('m=',m[i])

s=0
for i in range(n):
    s += m[i]
s += x

print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())
D,X =  map(int, input().split())
N_chocolate=0
for i in range (N):
	A= int(input())
	N_chocolate=N_chocolate+int(D/A)
output=N_chocolate+X+N
print (output)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
D, X = list(map(int, input().split()))
a = [int(input()) for _ in range(n)]
r = 0
for i in range(n):
    k = 0
    for j in a:
        r += 1 if k*j + 1 <= D else r
        k += 1

print(r)

Submission status: Wrong Answer

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

print (N, D, X, A)

for n in range(N):
    for d in range(1, D + 1):
        if d % A[n] == 1:
            X += 1

print(X)

Submission status: Wrong Answer

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

for i in range(N):
    k=1
    a=int(input())
    while k<D+1:
        if k%a ==1:
            S += 1
        k+=1
        
print(S+X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

res = 0

for i in A:
	res = res + int(D / i) + 1

print(res + X)

Submission status: Wrong Answer

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

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

ans = x

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
DX = list(int(i) for i in input().split())
A = list(int(i) for i in input().split())
N = 5
DX =[30, 44]
A =[26, 18, 81, 18, 6]

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: Wrong Answer

Solution code:
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input()))
N = 5
DX =[30, 44]
A =[26, 18, 81, 18, 6]

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: Wrong Answer

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//A[i])+1
print(S)

Submission status: Wrong Answer

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]) // int(i)
    ans = ans + ran
ans = ans + n + int(num[1])
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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
    print(count)
    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: Wrong Answer

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

Submission status: Wrong Answer

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(100):
    if (1+j*A[i])>D:
      S+=j
      break
  
print(S+X)

Submission status: Wrong Answer

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)
  else:
    al += 1
  k = 0
print(al)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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:
        r += d//nb +1

print(r)

Submission status: Wrong Answer

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)

print(ans+X)

Submission status: Wrong Answer

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))
  else:
    al += 1
print(al)

Submission status: Wrong Answer

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):
    print((D-1)//A[i]+1)
    cnt += (D-1)//A[i]+1
print(X+cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 b<d:
    o+=1
    b=c*a+1
    c+=1
o+=x
print(str(o))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s = 0
for a in A:
    for x in range(100):
        if a * x + 1 <= D:
            continue
        s += x
        break

print(s + X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 // A[i] + 1
    
print(X)

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    '''
    code here
    '''
    N = int(input())
    D, X = [int(item) for item in input().split()]
    As = [int(input()) for _ in range(N)]

    cnt = 0
    for i in range(N):
        day = 0
        j = 0
        while day <= D:
            day = j * As[i] + 1 
            cnt +=1
    print(cnt)


if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

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

Submission status: Accepted

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

def ans092(N:int, D:int, X:int, A:list):
    ans_int=0
    for i in range(N):
        j_count=0
        while True:
            if 1+A[i]*j_count<=D:
                ans_int+=1
                j_count+=1
                continue
            else:
                break
    return ans_int+X

print(ans092(N,D,X,A))

Submission status: Accepted

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

ans = 0
for i in a:
    cnt = 0
    days=1
    while days<=d:
        cnt+=1
        days+=i
    ans+=cnt
print(ans+x, flush=True)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from typing import List


def answer(n: int, d: int, x: int, a: List[int]) -> int:
    eaten_chocolates = 0
    for i in range(n):
        eaten_chocolates += len(range(1, d + 1, a[i]))

    return eaten_chocolates + x


def main():
    n = int(input())
    d, x = map(int, input().split())
    a = [int(input()) for _ in range(n)]
    print(answer(n, d, x, a))


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
N = int(input())
D,Z = map(int,input().split())
cnt = N
for i in range(N):
    A = int(input())
    day = 1 + A
    while day <= D:
        cnt += 1
        day += A

print(cnt + Z)

Submission status: Accepted

Solution code:
n = int(input())
d,x = list(map(int, input().split()))
ans = x
for _ 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())
A = [int(input()) for _ in range(N)]
count=0
for a_i in A:
  count+=len(range(1,D+1,a_i))
print(count+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
d, x = [int(num) for num in lines.pop(0).split(" ")]
a_list = [int(line) for line in lines]
ans = x
for a in a_list:
    ans += math.ceil(d / a)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
lst = input().split()
D = int(lst[0])

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

count = int(lst[1])

for Ai in A:
   s = 1
   while s <= D:
      count += 1
      s += Ai

print(count)

Submission status: Accepted

Solution code:
n = int(input())
d,x = [int(t) for t in input().split()]
a = []
for i in range(n):
  a.append(int(input()))
res = 0
for i in range(n):
  c = a[i]
  res += 1
  while c < d:
    res += 1
    c += a[i]
res += x
print(res)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
arr = []
ans = 0
ans += x

for _ in range(n):
    day_sum = 1
    keisu = 1
    num = int(input())

    while day_sum <= d:
        ans += 1
        keisu += 1
        day_sum += num
print(ans)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
N = int(input())
D,X = map(int,input().split())

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

member = len(A)

Chocolate = member + X
days = 1

while days<=D:
    for single_member in A:
        if single_member*days + 1 <= D:
            Chocolate += 1
    days += 1

print(Chocolate)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N: int, D: int, X: int, A: "List[int]"):
    ans = X + N
    for i in A:
        ans += ((D-1) // i)
    print(ans)


    return


# 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:
n = int(input())
d,x = map(int,input().split())
data = [int(input()) for i in range(n)]
ans = n
for i in range(n):
    ans += (d - 1) // data[i]
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()))

out=0
for i in range(N):
    j=0
    dam=0
    while True:
        dam = 1 + A[i]*j
        if dam > D:
            break
        out+=1
        j+=1
    # print(i,out)

print(X + out)

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

Submission status: Accepted

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

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

div = 0
for n in range(N):
    if A[n] == 1:
        div += (D-1) //A[n]
    elif D % A[n] == 0:
        div += (D-1) //A[n]
    else:
        div += D //A[n]

goukei = X + div + N

print(goukei)

Submission status: Accepted

Solution code:
N = int(input())
D,X = input().split()
x = 0
for n in range(N):
  An = int(input())
  x += 1+(int(D)-1)//An
c = x+int(X)
print(c)

Submission status: Accepted

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

cnt = x
for q in a:
    cnt += (d + q - 1) // q
print(cnt)

Submission status: Accepted

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

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

  mass += (i-1)


result = mass + X
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c=0

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


print(c+x)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    ans+=D//int(input())+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())
  b = d//a
  c = d%a
  if c != 0:
    ans += b+1
  else:
    ans += b
print(ans+x)

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter
import bisect


# \n
def input():
    return sys.stdin.readline().rstrip()


def main():
    N=int(input())
    D,X=map(int,input().split())
    ans =0
    for i in range(N):
        a =int(input())
        ans+=1 + (D-1)//a


    print(ans+X)




if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
  tmp = (d-1)//L[i]
  cnt += tmp
print(cnt)

Submission status: Accepted

Solution code:
N=int(input())
kazu=input().split(' ')
D=int(kazu[0])
X=int(kazu[1])
days=[]
count=0
for i in range(N):
  days.append(int(input()))
for i in range(N):
  a=0
  while 1:
    b=days[i]*a+1
    if b>D:
      break
    count=count+1
    a=a+1
print(count+X)

Submission status: Accepted

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

for i in range(N):
    a = int(input())
    X += 1
    while True:
        day += a
        if day > D:
            break
        else:
            X += 1
    
    day = 1

print(X)

Submission status: Accepted

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

cnt = 0
for a in A:
    if D % a == 0:
        cnt += D // a
    else:
        cnt += D // a + 1

print(X+cnt)

Submission status: Accepted

Solution code:
import math

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

count = 0
for num in a:
    count += math.ceil(d / num)
print(count + x)

Submission status: Accepted

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