Problem:


Score : 200 points

Problem Statement

Some number of chocolate pieces were prepared for a training camp.
The camp had N participants and lasted for D days.
The i-th participant (1 \leq i \leq N) ate one chocolate piece on each of the following days in the camp: the 1-st day, the (A_i + 1)-th day, the (2A_i + 1)-th day, and so on.
As a result, there were X chocolate pieces remaining at the end of the camp. During the camp, nobody except the participants ate chocolate pieces.

Find the number of chocolate pieces prepared at the beginning of the camp.

Constraints

1 \leq N \leq 100

1 \leq D \leq 100

1 \leq X \leq 100

1 \leq A_i \leq 100 (1 \leq i \leq N)

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
D X
A_1
A_2
:
A_N

Output

Find the number of chocolate pieces prepared at the beginning of the camp.

Sample Input 1

3
7 1
2
5
10

Sample Output 1

8

The camp has 3 participants and lasts for 7 days.
Each participant eats chocolate pieces as follows:

The first participant eats one chocolate piece on Day 1, 3, 5 and 7, for a total of four.

The second participant eats one chocolate piece on Day 1 and 6, for a total of two.

The third participant eats one chocolate piece only on Day 1, for a total of one.

Since the number of pieces remaining at the end of the camp is one, the number of pieces prepared at the beginning of the camp is 1 + 4 + 2 + 1 = 8.

Sample Input 2

2
8 20
1
10

Sample Output 2

29

Sample Input 3

5
30 44
26
18
81
18
6

Sample Output 3

56



Sample input:
3
7 1
2
5
10


Sample output:
8

Submission status: Accepted

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

print(ans+X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
D,X = map(int,input().split(" "))
count = 0
for i in range(N):
    A = int(input())
    i=0
    while(i*A+1<=D):
        count+=1
        i+=1
print(count+X)

Submission status: Accepted

Solution code:
people = int(input())
i = input().split()
day = int(i[0])
lastchoco = int(i[1])
num = [int(input()) for n in range(people)]
for n in num:
	for nn in range(1,day+1,n):
		lastchoco += 1
print(lastchoco)

Submission status: Accepted

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

for _ 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())
a = [int(input()) for i in range(n)]
ans = x
for i in range(n):
  for j in range(1,d+1):
    if j % a[i] - 1 == 0:
      ans += 1
    elif a[i] == 1:
      ans += 1

print(ans)

Submission status: Accepted

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

A = [int(input()) for x 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())
a = [int(input()) for i in range(n)]
cnt = 0
for i in a:
    day = 1
    while day <= d:
        day += i
        cnt += 1
    
print(cnt + x)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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,D,X,*A=map(int,open(0).read().split());print(X+sum(~-D//i+1 for i in A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    n=int(input())
    d,x=map(int,input().split()) 
    asum=0
    for i in range(n):
        a=int(input())
        asum=asum+(d-1)//a+1
    print(asum+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 = X
for a in A:
    t += 1 + (D-1) // a
print(t)

Submission status: Accepted

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

ans=x
for a in a_inputs:
    ans+=len([i for i in range(1,d+1) if (i-1)%a==0])
print(ans)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
num_of_participants = int(input())
days, remaining = map(int, input().split())
participants = []
eaten = 0

for i in range(num_of_participants):
    interval = int(input())
    eaten += len(range(1, days + 1, interval))

print(eaten + remaining)

Submission status: Accepted

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

for i in a:
    j = 1
    while j <= d:
        ans += 1
        j += i

print(ans)

Submission status: Accepted

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

key = 0
ans = 0
for i in range(n):
    if d % a[i] == 0:
        key = d // a[i]
    else:
        key = (d//a[i])+1
    ans += key
    key = 0
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 i in range(n):
    t = 0
    while 1 + a[i]*t <= d:
        ans += 1
        t += 1
print(ans+x)

Submission status: Accepted

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

for i in range(N):
    item = int(input())
    i = 0
    while D >= item * i + 1:
        date.append(item * i + 1)
        i += 1

print(len(date) + X)

Submission status: Accepted

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

res = 0
for i in range(1,d+1):
    for a in al:
        if (i-1)%a==0:
            res += 1
print(res+x)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, D: int, X: int, A: "List[int]"):
    print(X + sum(
        -(-D // Ai)
        for Ai in A
    ))


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

alist=[]
for i in range(N):
  alist.append(int(input()))
#print(alist)

choco=0
for i in range(D):
  for a in alist:
    if i%a==0:
      choco+=1
      
print(X+choco)

Submission status: Accepted

Solution code:
n = int(input())
m,k = map(int,input().split())
    
for i in range(n):
    for j in range(1, m+1, int(input())):
        k += 1
print(k)

Submission status: Accepted

Solution code:
n = int(input())
m, k = [int(_) for _ in input().split()]
    
for i in range(n):
    for j in range(1, m+1, int(input())):
        k += 1
print(k)

Submission status: Accepted

Solution code:
# solution
import io

n = int(input())
m, k = [int(_) for _ in input().split()]
    
for i in range(n):
    for j in range(1, m+1, int(input())):
        k += 1
print(k)

Submission status: Accepted

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

alist=[]
for i in range(N):
  alist.append(int(input()))
#print(alist)

choco=0
for i in range(1,D+1):
  for a in alist:
    if (i-1)%a==0:
      choco+=1
      
print(X+choco)

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 = []
while True:
  try:
    a.append(int(input()))
  except:
    break

lis = []
for i in range(n):
  tmp = d//a[i]
  if d%a[i]!=0:
    tmp +=1
  lis.append(tmp)

ans = sum(lis) + x
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))

def main():
    n = II()
    d, x = MII()
    aa = [II() for _ in range(n)]
    cnt = x
    for a in aa:
        cnt += -(-d//a)
    print(cnt)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix

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

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

ans = sum(chocos)+X

print(ans)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 092: B – Chocolate
n = int(input())
d, x = [int(s) for s in input().split()]
a = [int(input()) for _ in range(n)]

eaten = 0

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

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

for day in range(1, D+1):
    for person in A:
        if person == 1:
            X += 1
        else:
            if day % person == 1:
                X += 1
print(X)

Submission status: Accepted

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

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

print(X+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 = [int(x) for x in input().split()]
import math
ans = x
for i in range(n):
    ans += math.ceil(d/int(input()))
print(ans)

Submission status: Accepted

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

ans = X
for j in range(N):
    a = int(input())
    for i in range(D):
        if i*a + 1 <= D:
            ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ns = []
for ai in a:
  ns.append((d - 1) // ai + 1)

print(sum(ns) + x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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

Submission status: Accepted

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

b=[]
for i in range(len(a)):
    for j in range(1,d):
        if j*a[i]+1<=d:
            b.append(j*a[i]+1)

print(len(b)+n+x)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
mo = 10**9+7

def main():
	n=II()
	d,x=MI()
	ans = x
	for _ in range(n):
		a = II()
		times = (d-1)//a+1
		ans += times
	print(int(ans))


if __name__ == '__main__':
	main()

Submission status: Accepted

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

for j in range(N):
    ans += ((d-1)//a[j])+1
    
print(ans)

Submission status: Accepted

Solution code:
def myAnswer(N:int,D:int,X:int,A:list) -> int:
   total =  N
   for a in A:
      i = 1
      while i*a + 1 <= D:
         total += 1
         i  += 1
   return X + total

def modelAnswer():
   tmp=1
def main():
   N = int(input())
   D,X = map(int,input().split())
   A = []
   for _ in range(N):
      A.append(int(input()))
   print(myAnswer(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 _ in range(n)]
ans = x
for i in range(n):
    for time in range(120):
        if time*a[i]+1 > d:break
        ans+=1
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())
    cnt = 0
    while 1 + cnt * A <= D:
        cnt += 1
    ans += cnt
print(X + ans)

Submission status: Accepted

Solution code:
N,D,X,*A = map(int,open(0).read().split()) 

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ans = n + x
for _ in range(n):
    a = int(input())
    ans += (d - 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)]

ch = X

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

Submission status: Accepted

Solution code:
import sys

def resolve():
    N = int(input())
    D, X = list(map(int, input().split(" ")))
    A = []
    [A.append(int(input())) for i in range(N)]
    chocos = [0 for i in range(D+1)]
    for a in A:
        day = 1
        while True:
            if day > D:
                break
            chocos[day] += 1
            day = day + a
    print(sum(chocos)+X)

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

for i in range(n):
  day = int(input())
  x += (d-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)]
ans = n + x

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
url = "https://atcoder.jp/contests/abc092/tasks/abc092_b"

def main():
    a = int(input())
    n, m = list(map(int, input().split()))
    choko = m
    for i in range(a):
        tmp = int(input())
        if tmp == 1:
            choko += tmp * n
        else:
            choko += (n - 1) // tmp + 1
    print(choko)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0

for i in range(N):
    for day in range(1,D+1):
        if (day-1)%A[i] == 0:
            ans += 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())
    i = 0
    while i*A+1 <= D:
        X += 1
        i += 1
print(X)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
D, X = [int(i) for i in input().split()]
eaten = 0
for i in range(N):
  A = int(input())
  eaten += D//A
  if D % A != 0:
    eaten += 1
print(eaten + 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 i in A:
  for j in range(D):
    if j % i == 0: ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())

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

tp = 0
for a in range(A):
  x = int(input())
  tp += D//x + (0 if D%x==0 else 1)
  
print(X+tp)

Submission status: Accepted

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

for num in A:
  for j in range(D):
    if 1 + num * j <= D:
      res += 1

print(res)

Submission status: Accepted

Solution code:
_, d, x, *a = map(int, open(0).read().split())
print(sum(-(-d // i) for i in a) + x)

Submission status: Accepted

Solution code:
import math

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

res = x
for i in range(n):
    res += math.ceil(d / A[i])
print(res)

Submission status: Accepted

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

ans += X
print(ans)

Submission status: Accepted

Solution code:
def main():
    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):
        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())
for _ in range(n):
    x += (d-1)//int(input())+1
print(x)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

ans = x
for i in a:
    ans += 1
    for j in range(1, d + 1):
        sub = (i * j) + 1
        if sub > d:
            break
        ans += 1

print(ans)

Submission status: Accepted

Solution code:

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

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

print(ans)

Submission status: Accepted

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

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

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

print(ctr + 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 a*j+1 <= d:
        j += 1
    ans += j
print(ans+x)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  n = int(input())
  d,x = map(int,input().split())
  
  a = [int(input()) for _ in range(n)]
  #cnt = 0
  ans = 0
  for i in range(n):
    j = 0
    cnt = 0
    while 1 + a[i]*j <= d:
      j += 1
      cnt += 1
    #print(j,cnt)
    ans += cnt
  print(ans + 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)]
s=[]
for i in range(n):
    s.append((d-1)//a[i]+1)
print(sum(s)+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans+n+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

Solution code:

import math
import itertools
import statistics
#import numpy as np
#import collections
n = int(input())
d, x = list(map(int, input().split()))
a = []
for i in range(n):
    a.append(int(input()))

total = 0
for i in range(n):
    total += d//a[i]
    if d%a[i]!=0:
        total += 1
        
total += x

print(total)

Submission status: Accepted

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

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

print(ans)

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

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(j) for j in input().split()]
from collections import Counter
#template
#issueから始める
N = int(input())
D,X = inputlist()
A = [0]*N
ans = 0
for i in range(N):
    A[i] = int(input())
    ans += (D-1) // A[i] + 1
print(ans + X)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
v = [1 + (D - 1) // A[i] for i in range(N)]
ans = sum(v) + 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 = 0
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
for i in range(N):
    ans += ceil(D/A[i])
ans += X
print(ans)

Submission status: Accepted

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

cnt = 0
for a in al:
    for i in range(1, d+1, a):
        cnt += 1

print(cnt + x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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