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:
# coding: utf-8
N = int(input())
D, X = map(int, input().split())
ans = X
for i in range(N):
    A = list(range(1, D+1, int(input())))
    ans += len(A)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor
def main():
    n = int(input())
    d, x = map(int, input().split())
    a = []
    for _ in range(n):
        a.append(int(input()))

    for ea in a:
        x += 1
        x += floor((d - 1) // ea)

    print(x)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    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)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
import math
A,B=list(map(int,input().split()))
ans = B
for i in range(N):
    ans+=math.ceil(A/int(input()))
print(ans)

Submission status: Accepted

Solution code:
#print#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
import itertools
def resolve():
    N,=pin()
    D,X=pin()
    A=[int(input())for i in range(N)]
    cnt=0
    for d in range(D):
        for a in A:
            if d%a==0:cnt+=1
    print(cnt+X)            
        

#%%submit!    
resolve()

Submission status: Accepted

Solution code:
#ABC092-B
n = int(input())
d,x = map(int,input().split())
a = []
for _ in range(n):
    a.append(int(input()))
    
cnt = 0
tmp = 0

for i in range(n):
    tmp = 1
    while True:
        if tmp <= d:
            cnt += 1
            tmp += a[i]
        else:
            break
            
            
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)]

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())
a_l = [int(input()) for _ in range(n)]

count = 0
for a in a_l:
    b = 0
    while b*a+1 <= d:
        count += 1
        b += 1

print(count+x)

Submission status: Accepted

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

    count = x
    for a in a_s:
        count += ((d-1) // a) + 1

    print(count)

resolve()

Submission status: Accepted

Solution code:
N = int(input())
D, X = list(map(int,input().split()))
A = [int(input()) for _ in range(N)]
sum = N+X
for a in A:
    n = 1
    while True:
        if n*a+1 > D:
            break
        else:
            n +=1
            sum += 1
print(sum)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int, input().split())
cnt = X+N
for i in range(N):
    a = int(input())
    j = 1
    while a*j+1 <= D:
        j += 1
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a=list(int(input())for i in range(n))
ans=0
def f(x):
    num=0
    count=0
    i=0
    while num<=d:
        num=i*x+1
        i+=1
        count+=1
    return count-1
for i in range(n):
    ans+=f(a[i])
print(ans+x)

Submission status: Accepted

Solution code:
import sys
from collections import Counter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n=int(input())
d,x=mp()
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())
As = [int(input()) for _ in range(N)]
 
c = X
for A in As:
  c += ((D-1) // A) + 1
  
print(c)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a_list = [int(input()) for nesya in range(n)]
choco = 0
for num in a_list:
  choco += ((d-1) // num + 1)
choco += x
print(choco)

Submission status: Accepted

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

for i in range(N):
        for j in range(D):
            if A[i] * j  + 1> D:
                break
            num += 1

print(num + X)

Submission status: Accepted

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

ans = 0
for _ in range(n):
  a = int(input())
  day = 1
  while day<=d:
    ans += 1
    day += a

print(ans+x)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

ANS = 0
for a in A:
  d = 1
  while d <= D:
    ANS += 1
    d += a
    
print(ANS + X)

Submission status: Accepted

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

for _ in range(n):
    i = 0
    a = int(input())
    while a * i + 1 <= d:

        cnt += 1
        i += 1

print(cnt)

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 += 1
    t = 1 + a[i]
    while t <= d:
        x += 1
        t += a[i]

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 i in range(len(A)):
    for j in range(d):
        if A[i]*j+1 <= d:
            cnt += 1

print(cnt+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
N = ri()
D, X = ri_()
A = [ri() for _ in range(N)]
E = [(D - 1) // i + 1 for i in A]
print(sum(E) + X)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
  a = int(input())
  total += math.floor(d / a) + 1

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

sum = N

for i in range(N):
    cnt = 1    
    while True: 
        if cnt*A[i]+1 <= D:
            sum += 1
            cnt += 1
        else :
            break
            
print(sum + X)

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N = int(input())
D,X = map(int,input().split())
A = [int(input()) for _ in range(N)]
 
from math import ceil
ans = 0
for i in range(N):
    ans += ceil(D/A[i])
 
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())
    j = 0
    while (j*A + 1) <= D:
        j += 1
    ans += j

print(ans + X)

Submission status: Accepted

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

for i in range(n):
  a = int(input())
  A.append(a)
  
for i in range(n):
  if d%A[i] != 0:
    ans += d//A[i] + 1
  elif d%A[i] == 0:
    ans += d//A[i]
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

for i in range(n):
  a = int(input())
  k = np.floor((d-1)/a) + 1
  x += k

print(int(x))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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

a = list(int(input()) for i in range(n))

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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

a = list(int(input()) for i in range(n))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

n=I()
d,x=MI()
ans=0
for i in range(n):
    ans+=1+int((d-1)//I())
print(ans+x)

Submission status: Accepted

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

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

print(count + X)

Submission status: Accepted

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

ans = x
for i in a:
    if d % i == 0:
        ans += d // i
    else:
        ans += d // i + 1

print(ans)

Submission status: Accepted

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

la = list()
for i in range(N):
    la.append(int(input()))

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

print(ans + X)

Submission status: Accepted

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

for i in e:
  day = 1
  while day<=d:
      day = day+i
      choco += 1

print(choco)

Submission status: Accepted

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

d = 1
ans = 0
while d <= D:
    for a in A:
        if a == 1:
            ans += 1
        elif d%a == 1:
            ans += 1
    d += 1

print(ans+X)

Submission status: Accepted

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

Submission status: Accepted

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

    ans = x
    for aa in a:
        if d % aa == 0:
            ans += d//aa
        else:
            ans += d//aa + 1

    print(ans)


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

print(c+X)

Submission status: Accepted

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



if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
LIN=lambda : list(IN())
mod=1000000007

#+++++

def main():
	n = int(input())
	d , x = IN()
	for _ in range(n):
		ai=int(input())
		init=1
		x+=1
		for i in range(1, 1000):
			if ai*i + 1 > d:
				break
			x+=1
	print(x)
	#s = input()
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def multi_input():
    return map(int, input().split())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

num=[]
for j in A:
    count=[]
    for k in range(D):
        if j*k+1<=D:
            count.append(1)
    num.append(len(count))

print(sum(num)+X)

Submission status: Accepted

Solution code:
N = int(input())
D, X = list(map(int, input().split()))
ans = X
for _ in range(N):
    a = int(input())
    if D % a == 0:
        ans += D // a
    else:
        ans += D // a + 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)]
count = 0
def HowManyDaysEaten(d, a):
    l = list()
    i = 1
    while d >= (i - 1) * a + 1:
        l.append((i - 1) * a + 1)
        i += 1
    return l 
for i in A:
    count += len(HowManyDaysEaten(D, i))
print(count + X)

Submission status: Accepted

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

Submission status: Accepted

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

res = 0
for i in range(N):
    res += len(list(range(1,D+1,A[i])))
print(res+X)

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

ans = X

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import sys

input = sys.stdin.readline

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

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

res = 0
for i in range(100):
    for j in range(N):
        if i*A[j]+1 <= D:
            res+=1

print(res+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())
print(x+n)

Submission status: Accepted

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

resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

A = sorted(A)

for i in range(N):
    a = A[i]
    count +=1
    for j in range(D):
        if a+1<=D:
            count+=1
            a += A[i]
        else:
            break

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
d, x = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
ans = x
for n in range(N):
    count = 0
    while d >= A[n] *count +1:
        ans += 1
        count += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
li = [int(input()) for _ in range(N)] #n行に１つずつ入力される整数
ans = 0
for i in li:
    for j in range(1, D+1, i):
        ans += 1
print(ans+X)

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    n = ni()
    d, x = nm()
    a = [ni() for _ in range(n)]

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

    print(ans + x)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(readline())
    D, X = map(int, readline().rstrip().split())
    for _ in range(N):
        a = int(readline())
        X += math.floor((D-1) / a + 1)

    print(X)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
d, x = map(int, input().split())
chocolate = np.array([0] * d)
for player in range(n):
    chocolate[::int(input())] += 1
print(chocolate.sum() + 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 a:
    ai = 1
    while ai<=d:
        ai = ai+i
        ans += 1
print(ans+x)

Submission status: Accepted

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

Submission status: Accepted

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


def f(x):
    count = 0
    for i in range(0, D):
        if (i * x + 1 <= D):
            count += 1
        else:
            break
    return count


s = []
for i in range(N):
    s.append(f(A[i]))

print(sum(s) + X)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc092/tasks/abc092_b
n = int(input())
d, x = map(int, input().split())
nums = []
for _ in range(n):
    nums.append(int(input()))

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


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

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(int,input().split()))
c=[int(input()) for _ in range(a)]
ans=0
for i in range(a):
    ans+=b[0]//int(c[i])+1
for k in range(a):
    if c[k]==1 or b[0]%int(c[k])==0:
        ans-=1
print(ans+b[1])