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(' '))
a = [int(input()) for i in range(n)]
count = int()

for i in range(n):
# print('#',i+1, '人目')
  for dy in range(100):
    day =  dy * a[i] + 1
    if day > d:
      break
    else:
#     print('#',day, '日目')
      count+=1
# print('#count', count)

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()))
    
eat = 0

for i in A:
    eat += 1 + (D-1)//i

print(eat + X)

Submission status: Accepted

Solution code:
import numpy

def main():
    n = int(input())
    d, x = map(int, input().split())
    
    y = []
    for i in range(0, n):
        Ai = int(input())
        y.append(int((d-1)/Ai) + 1)

    

    arr_numpy = numpy.array(y)
    print(numpy.sum(arr_numpy) + x)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for p in A:
    i = 0
    while True:
        date = 1 + p * i
        if date > D:
            break
        else:
            i += 1
            X += 1

print(X)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
A = [int(input()) for i in range(N)]

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

Submission status: Accepted

Solution code:
n = int(input())
data = input().split()
d = int(data[0])
x = int(data[1])
a = []
for i in range(n):
	a.append(int(input()))
sum = 0
for i in range(n):
	j = 1
	while j <= d:
		j += a[i]
		sum += 1	
print(sum+x)

Submission status: Accepted

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

count = 0

for n in range(N):
    count += (1 + (D-1) // List[n])

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

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

Submission status: Accepted

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

count = 0
for k in (A):
    for n in range(D):
        if k*n <  D:
            count +=1
print(count+X)

Submission status: Accepted

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

eatlist = [(D-1)//j+1 for j in A]
print(sum(eatlist)+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(a)

points = []
for i in A:
    if D%i == 0:
        point = D//i
    else:
        point = D//i + 1
    points.append(point)

print(sum(points)+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:
    day = 1
    cnt = 0
    while day <= D:
        ans += 1
        cnt += 1
        day = cnt*i+1
print(ans+X)

Submission status: Accepted

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

choco = x

for i in a:
    for j in range(d+1):
        chocoday = i * j + 1
        if chocoday <= d:
            choco += 1
        else:
            break
        
print(choco)

Submission status: Accepted

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

for A in a:
    c += int((d-1)/A)
print(c)

Submission status: Accepted

Solution code:
n=int(input())
d,x=list(map(lambda x:int(x), input().split()))
a=[int(input()) for _ in range(n)]
count=0
for mem in range(n):
    for dd in range(d):
        if dd*a[mem]+1>d:
            break
        count+=1
print(count+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())

for i in range(N):
        X=X+int((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 i in range(N)]

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

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

print(X+sum)

Submission status: Accepted

Solution code:
import sys

N=int(input())

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

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

ans=X

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

print(ans)

Submission status: Accepted

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

for person in range(n):
    day = int(input())
    choco_for_person = (d-1)//day + 1
    all_choco += choco_for_person

print(all_choco+x)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math
n = int(input())

d = input().split()
d[0] = int(d[0])
s = 0
for i in range(n):
    s = s + math.ceil(d[0]/int(input()))
print(s + int(d[1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

chocolate = x

for i in a:
	chocolate += 1
	days = 1
	while(True):
		days += i
		if days <= d:
			chocolate += 1
		else:
			break

print(chocolate)

Submission status: Accepted

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

alist = [int(input()) for i in range(n)]

ans = x

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

#人数
n = int(arr_data[0][0])

#日数
d = int(arr_data[1][0])

#残ったチョコ
x = int(arr_data[1][1])

mysum=0
for i in range(2, 2 + n):
    
    
    a = int(arr_data[i][0])
 
#    print(a,mysum)
    
    mysum+=1
    
    cnt=1
    
#    print(mysum)
    
    while(cnt+a<=d):
        
        mysum+=1
        
        cnt+=a
 
        
mysum += x
print(mysum)

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(N):
    if D % A[i] == 0:
        sum += int(D/A[i])
    else:
        sum += int(D/A[i])+1

print(sum+X)

Submission status: Accepted

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

Submission status: Accepted

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

choco = 0
for diff in a:
    n = 0
    an = 0
    while 1:
        an = 1 + diff * n
        if an > day:
            break
        choco += 1
        n += 1
print(choco + x)

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):  # それぞれの参加者ごとに
    day_count = 0
    while day_count * a[i] + 1 <= d:
        count += 1
        day_count += 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)]
cnt = N

# print(N)
# print(D)
# print(X)
# print(a)
# print(cnt)

for i in range(1, D):
    # print("%d:" %i)
    for j in range(N): 
     if(i % a[j] == 0):
        #  print("check%d" %j)
         cnt += 1
        #  print(cnt)

cnt += X
print(cnt)

Submission status: Accepted

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

ans = X
for person in range(n):
    ans += 1 + (D-1) // a[person]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(len([day for step in A for day in range(1, D + 1, step)]) + X)

Submission status: Accepted

Solution code:

n = int(input())
#日
d,x = input().split()
#合宿終了後のチョコレートの個数





#i人目のA日目に食べた数を数える
num = 0

#配列
a = []

#３人分
for i in range(n):
    a.append(int(input()))
    for j in range(int(d)):
        if a[i]*j +1 <= int(d):
            num += 1
    
    
    
    
            
print(num+int(x))

Submission status: Accepted

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

for i in range(N):
    A.append(input())

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

print("%d" % (C+int(X)))

Submission status: Accepted

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

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

print(chocolates)

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

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

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

print(s)

Submission status: Accepted

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

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

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

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

print(total + x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def choco(a, d):
	return (d - 1) / a + 1

n = int(raw_input())
inpt = map(int, raw_input().split())
ans = inpt[1]

for i in range(0, n):
	a = int(raw_input())
	ans = ans + choco(a, inpt[0])

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

print(x)

Submission status: Accepted

Solution code:
def get_next_int():
    return int(float(input()))


def get_next_ints(delim=" "):
    return tuple([int(float(x)) for x in input().split(delim)])


def get_next_str():
    return input()


def get_next_strs(delim=" "):
    return tuple(input().split(delim))


def get_next_by_types(*value_types, delim=" "):
    return tuple([t(x) for t, x in zip(value_types, input().split(delim))])


def solve():
    N = get_next_int()
    D, X = get_next_ints()
    choco = X + N
    for i in range(N):
        A = get_next_int()
        choco += int((D - 1) / A)
    print(choco)
solve()

Submission status: Accepted

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

Submission status: Accepted

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

eat = []
# i番目の参加者はeat[i]個食った
# i番目の参加者は1, A[i]+1, 2*A[i]+1 …日目に食べる
for i in range(N):
    cnt = 0
    eat.append(0)
    while True:
        day = cnt * A[i] + 1
        if day > D: break
        eat[i] = eat[i] + 1
        cnt = cnt + 1
print(sum(eat) + X)

Submission status: Accepted

Solution code:
N = int(input())

list1 = list(map(int, input().split()))
D = list1[0]
X = list1[1]

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

print(ans + X + N)

Submission status: Accepted

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

print(sum(nums) + X)

Submission status: Accepted

Solution code:
N = input()#人数
D, X = input().split()#日、残りチョコ
A = []
for i in range(int(N)):
    A.append(int(input()))

choco = int(X)
for day in range(int(D)):
    for Ai in A:
        if day % Ai == 0:
            choco = choco + 1

print(choco)

Submission status: Accepted

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

import math

n = int(input())
d, x = list(map(int, input().split()))
a = []
sum = 0

for i in range(n):
    z = int(input())
    shou = math.floor(d / z)
    #print("shou: " + str(shou))
    if z != 1:
        shou += 1
        if d % z == 0:
            shou -= 1
    sum += shou
    #print("sum: " + str(sum))

print(sum + x)

Submission status: Accepted

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

    print(sum(map(lambda a: (d - 1) // a + 1, ls)) + x)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

people_count = int(input())
day_count_and_leave_count = input()
day_count = int(day_count_and_leave_count.split()[0])
leave_count = int(day_count_and_leave_count.split()[1])
interval_date_list=[]
for x in range(0,people_count):
	interval_date_list.append(int(input()))

choco_count = 0
for interval_date in interval_date_list:
	choco_count += 1
	choco_count += math.floor((day_count - 1) / interval_date)
choco_count += leave_count
print(choco_count)

Submission status: Accepted

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

ans=int(0)

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

print(ans+x+n)

Submission status: Accepted

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

import sys

N = int(sys.stdin.readline())
IN = sys.stdin.readline().split(' ')

D = int(IN[0])
X = int(IN[1])

X2 = N

for i in range(N):
	A = int(sys.stdin.readline())
	X2 += int((D - 1) / A)

print(str(X2 + X))

Submission status: Accepted

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

ans = 0

for i in a:
  for j in range(1, D+1, i):
    ans += 1

print(ans+X)

Submission status: Accepted

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

Submission status: Accepted

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

print(res + int(X))

Submission status: Accepted

Solution code:
n = int(input())
nums = input().split(' ')
d, x = int(nums[0]), int(nums[1])

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

chocos = []
for itv in itvs:
    choco = int((d - 1) / itv) + 1
    chocos.append(choco)

print(sum(chocos) + 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)]

choco = 0

for i in range(N):
    cnt = 0
    a = 0
    while a * A[i] + 1 <= D:
        cnt = cnt + 1
        a = a + 1
    choco = choco + cnt
print(choco + X)

Submission status: Accepted

Solution code:
import sys

def _calc(Ai, j):
    if j != 0:
        return j * Ai + 1
    if j == 0:
        return 1

def main(inp_list):
    # return inp_list
     N = inp_list[0]
     D = inp_list[1][0]
     X = inp_list[1][1]
     A = inp_list[2:]
     #return type(A[0][0])
     results =[ _calc(per[0], i) for per in A  for i in range(0,100) if _calc(per[0], i) < D + 1]
     return len(list(results)) + X

def init(MODE):
    if MODE == 0:
        while True:
            try:
                result = int(input())
                yield result
            except:
                break

    if MODE == 1:
        while True:
            try:
                li=list(map(int,input().split()))
                yield li
            except:
                break
if __name__ == '__main__':
    """ MODE: 0 縦, 1 縦横, 2 横 """
    MODE = 1
    inp_list = init(MODE)
    print(main(list(inp_list)))

Submission status: Accepted

Solution code:
import numpy
import sys

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

x = X

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

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


print(r + 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())
    n = (D-1)//A + 1
    #print(n)
    ans += n
    
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)]
C = 0

for i in range(N):
    for j in range(1,D+1):
        if (1+j*A[i]) <= D:
            C += 1

print(N+C+X)

Submission status: Accepted

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

N = int(input())

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

count = []
for i in range(N):
    cnt = 0
    for d in range(D):
        if A[i]*d + 1 <= D:
            cnt += 1
        else:
            break
    count.append(cnt)

print(sum(count) + X)

Submission status: Accepted

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

n = int(input())
d, x = [int(x) for x in input().split()]
count = 0
for i in range(n):
    num = int(input())
    for j in range(d):
        if num == 1:
            count += 1
        elif(j+1) % num == 1:
            count += 1
print(x + count)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

ans=x

for i in range(1,n+1):
    a=int(input())
    ans+=math.ceil(d/a)

print(round(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

cost = 0
for i in range(n):
    a = int(input())
    cost += d // a
    if d % a != 0:
        cost += 1

print(cost + x)

Submission status: Accepted

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


chocolate = 0
for i in list:	
	count = 0
	while(True):
		if count*i + 1 <= D:
			chocolate += 1
			count += 1
		else:
			break

print(chocolate+X)

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(raw_input())
d, x = map(int, raw_input().split())
ans = x
val = []
for i in range(n):
    val.append(int(raw_input()))

for i in val:
    for j in range(d):
        if (i*j + 1) <= d:
            ans = ans + 1
        else :
            continue

print ans

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())    # 参加者
D, X = map(int, input().split())    # day, 余ったチョコの個数
sum_c = 0           # 参加者が食べたチョコの合計
for i in range(N):
    tmp = int(input())
    sum_c += int(D / tmp)
    if D%tmp != 0:
        sum_c += 1

print(sum_c + X)

Submission status: Accepted

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

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

Submission status: Accepted

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

import math

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

for i in range(N):
    ans += math.ceil(D / a[i])

print(ans + X)

Submission status: Accepted

Solution code:
N = int(input());
D, X = [int(i) for i in 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 = [int(i) for i in input().split()];

# print(N);
# print(D);
# print(X);

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

print(X);

Submission status: Accepted

Solution code:
people = int(input())
days, left = [int(i) for i in input().split()]
eaten = 0
for i in range(people):
    a = int(input())
    eaten += (days-1) // a + 1

print(eaten + left)

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(D):
    for a in A:
        if i%a==0:
            ans+=1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

print(X + sum([(D - 1) // int(input()) + 1 for _ in range(N)]))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    n = int(input())
    d, x = map(int, input().split())
    ans = 0
    factors = { dayNum:0 for dayNum in range(1, d+1) }
    for tmp in range(n):
        a = int(input())
        factors[1] += 1
        num = 1
        while num*a+1 <= d:
            factors[num*a+1] += 1
            num += 1
    for tmp in range(1, d+1):
        ans += factors[tmp]
    else:
        ans += x
        print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#人数
person = int(input())
days, final = map(int, input().split())
for i in range(person):
  eat_day = int(input())
  eat_time = ((days-1) // eat_day) + 1
  final += eat_time
print(final)