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:
import sys
from math import ceil
def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    D, X = map(int, input().split())
    A = [int(input()) for _ in range(N)]
    choco = X
    for a in A:
        choco += ceil(D / a)
    print(choco)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

resolve()

Submission status: Accepted

Solution code:
n = int(input())
D,X = map(int,input().split())
A = [int(input()) for _ in range(n)]
#print(A)
ref = 0
count = [0]*len(A)
for i in range(len(A)):
    ref = 0
    #print(count[i],A[i],i)
    while True:
        ref = count[i]*A[i]+1
        if ref <= D:
            count[i]+=1
        else:
            break
#print(count)
print(sum(count)+X)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
l=[int(input()) for _ in range(n)]
for i in l:
    j=0
    while 1:
        if j*i+1<=d:
            x+=1
        else:
            break
        j+=1
print(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:
N = int(input())
D, X = map(int, input().split())
A = []
for _ in range(N):
    A.append(int(input()))
    
print(X + len(A) + sum([(D - 1) // ai for ai in A]))

Submission status: Accepted

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

A = (D-1)//A + 1
print(A.sum() + X)

Submission status: Accepted

Solution code:
import sys
N = int(input())
D,X = map(int,input().split())
array_A = []
for I in range(N):
    array_A.append(int(input()))

if not ( 1 <= N and D and X <= 100):
    sys.exit()
for J in range(len(array_A)):
    if not ( 1 <= array_A[J] <= 100):
        sys.exit()

count = 0
for K in range(len(array_A)):
    day = 1
    while day <= D:
        count += 1
        day += array_A[K]

print(count+X)

Submission status: Accepted

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

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

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

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

print(ans+X)

Submission status: Accepted

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

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 l in range(100):
        aa=a*l+1
        if aa<=d:
            cnt+=1
        else:
            break
    #print(cnt)
    ans+=cnt
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)]

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

print(total+n+x)

Submission status: Accepted

Solution code:
n, d, x ,*aa = map(int, open(0).read().split())

print(n+sum((d-1)//a for a in aa)+x)

Submission status: Accepted

Solution code:
def actual(N, D, X, A):
    # 2 * [食べたチョコ] + 1 <= D かつ [食べたチョコ]は左の式を超えない整数 を解けばよい
    count_chocolates = lambda a_i: (D - 1) // a_i + 1

    return X + sum([count_chocolates(a_i) for a_i in A])

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

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

Submission status: Accepted

Solution code:
def actual(N, D, X, A):
    # 2 * [食べる日数] + 1 <= D かつ [食べる日数] は整数を解けばよい 
    count_eating_days = lambda a_i: (D - 1) // a_i + 1

    eating_day_counts = sum([count_eating_days(a_i) for a_i in A])

    return X + eating_day_counts

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

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

Submission status: Accepted

Solution code:
def actual(N, D, X, A):
    count = 0

    for a_i in A:
        for i in range(100+1):
            eating_day = 1 + (a_i * i)

            if eating_day <= D:
                count += 1

    return X + count

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

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

Submission status: Accepted

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

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(len(a)):
    for j in range(1, d+1, a[i]):
        eat += 1

print(x + eat)

Submission status: Accepted

Solution code:
p = int(input())
day, a = map(int, input().split())
day = day - 1
for i in range(p):
  b = int(input())
  b = day // b
  a = a + b + 1
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())
d, x = [int(w) for w in 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())

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())
res = x
for i in range(n):
  a = int(input())
  res += ((d - 1) // a + 1)
print(res)

Submission status: Accepted

Solution code:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

N = int(input())
D, X = map(int, input().split())
list_A = [int(input()) for i in range(N)]
list_n = [0] * N

for i in range(1, D + 1):
    for j in range(N):
        if (i - 1) % list_A[j] == 0:
            list_n[j] += 1
print(sum(list_n)+X)

Submission status: Accepted

Solution code:
import math
n = int(input())
d,x = map(int, input().split())
lis = []
for i in range(n):
    lis.append(int(input()))
    
cnt = 0
for i in lis:
    cnt += math.ceil(d/i)

print(cnt+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())
    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 = list(int(input()) for _ in range(n))

cnt = 0
for a in A:
    tmp = (d - 1) // a
    cnt += tmp + 1

print(cnt + x)

Submission status: Accepted

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

for i in range(0,n):
  a[i] = int(input())
  
ans = 0
for i in range(n):
  day = 1
  j = 1
  while True:
    if day > d:
      break
    else:
      ans += 1
      day = j*a[i] + 1
      j += 1
      
print(ans+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
al=[int(input()) for i in range(n)]
total=0
for i in range(n):
    total+=1
    day=al[i]
    while True:
        if day+1<=d:
            total+=1
            day+=al[i]
        else:
            break
print(total+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())
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())

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

Submission status: Accepted

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

total = X
for _ in range(N):
    A = int(input())
    for _ in range(1, D+1, A):
        total += 1

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

# check
for a in A:
    X += len(list(range(1, D + 1, a)))

print(X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ate=0
for j in range(D):
  for a in A:
    if j%a==0 :
      ate+=1
      
print(X + ate)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
D, X = lr()
choco = 0
for _ in range(N):
    a = ir()
    choco += 1 + (D-1) // a

answer = X + choco
print(answer)

Submission status: Accepted

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

ans = 0
for i in l:
    tmp = (d-1)//i
    ans += tmp+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)]
total = 0
for i in range(len(a)):
  eat = 0
  count = 0
  while eat <= d:
    count += 1
    eat = a[i] * count + 1
  total += count
print(total + x)

Submission status: Accepted

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

print(c+X)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
A=list()
chocolate=0
for i in range(N):
    A.append(int(input()))
for i in range(D):
    for j in A:
        if ((i+1)%j==1)|(j==1):
            chocolate+=1
print(chocolate+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

et = 0
for a in A:
    et += (D-1)//a[0] + 1
print(et+X)

Submission status: Accepted

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

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

sum += x
print(sum)

Submission status: Accepted

Solution code:
n = int(input())

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

count = x

for _ in range(n):
    a = int(input())
    for i, z in enumerate(range(1, d+1, a)):
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# template by 3xC and starkizard.
# contributors: 

#####################################################################################
from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

#####################################################################################

"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod

    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)

def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): # math.gcd is slower
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def check_sorted(a):
    ''' returns True/False '''
    for i in range(len(a)-1):
        if a[i]>a[i+1]:
            return False
    return True
def ceil(n, k=1): return n // k + (n % k != 0) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []
def write(s): return sys.stdout.write(s)












###################################################################
def main():
    #CODE GOES HERE:
    n=ii()
    d,x=mi()
    answer=0
    for i in range(n):
        answer+=ceil(d/ii())
    print(int(answer+x))    
    

















    
""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""

py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192

class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):

    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')

""" main function"""

if __name__ == '__main__':
    main()
    # threading.Thread(target=main).start()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    d,x = map(int, input().split())
    count = x

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

    print(count)

Submission status: Accepted

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

for i in range(n):
    a.append(int(input()))
l=[]   
for i in range(n):
    l.append((d-1)//a[i]+1)
    
print(sum(l)+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))
    eats = 0
    N = input_number()
    D, X = input_number_list()
    for i in range(N):
        A = input_number()
        eat = D // A
        if D % A != 0:
            eat += 1
        eats += eat
    print(eats + X)


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)]
c = 0
for k in a:
    if d % k == 0:
        c += d // k
    else:
        c += d // k + 1
print(x + c)

Submission status: Accepted

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

ans = N + X

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = [int(input()) for _ in range(n)]
arr = list(range(1, d + 1))
ans = 0

for i in a:
    emp = arr[::i]
    ans += len(emp)

print(ans + 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())
cnt=0
for i in range(n):
    a=int(input())
    cnt+=int(d//a+(d%a)//(d%a-10**(-10)))
print(cnt+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
chocolate = [i for j in A for i in range(1, D+1, j)]
print(len(chocolate)+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:
    for j in range(101):
        if (j * i) + 1 > D:
            ans += j
            break
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)]

L = []
for i in range(len(A)):
  a = d // A[i]
  if (a*A[i])+1 <= d:
    L.append(a+1)
  else:
    L.append(a)
print(sum(L) + x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    D, X = list(map(int, input().split()))
    A = [int(input()) for _ in range(N)]
    ans = 0
    for i in range(N):
        for j in range(201 + 1):
            if j * A[i] + 1 <= D:
                ans += 1

    print(ans+X)
    return


resolve()

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

Submission status: Accepted

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

ans = x + n + sum([ d // i if d % i != 0 else d // i -1 for i in a])
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = (int(i) for i in input().split())
A = [None] * n
for i in range(n):
    A[i] = int(input())
    
eated_num = 0
for a in A:
    i = 0
    while True:
        eat_date = i*a + 1
        if eat_date <= d:
            eated_num += 1
            i += 1
        else:
            break
print(eated_num + x)

Submission status: Accepted

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

def f(d,m):
    return 1 + (d-1)//m

def solve(d,x,a):
    ans = x
    for i in range(len(a)):
        ans += f(d,a[i])
    return ans



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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = x
for _ in range(n):
    a = int(input())
    k = 0
    while k*a <= d-1:
        s += 1
        k += 1
print(s)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
dic = {}
for i in range(n):
  a = int(input())
  dic[i] = [a *(j - 1) + 1 for j in range(2, d + 1) if a *(j - 1) + 1 <= d]
ans = 0
for v in dic.values():
  ans += len(v)
ans += n + x
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
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())
A = []
for _ in range(n):
    A.append(int(input()))

ans = x
day = 0
for e in A:
    while 1 + day * e <= d:
        day += 1
        ans += 1
    # print(day)
    day = 0
print(ans)