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:
#!/usr/bin/env python

def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, = read_line(int)
d, x = read_line(int, int)

a = []
for i in range(n):
    ai, = read_line(int)
    a.append(ai)


sum = 0
for ai in a:
    sum += len(range(0, d, ai))

print(sum + x)

Submission status: Accepted

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

ary_A=[]

for i in range(N):
    ary_A.append(int(raw_input()))

#print ary_A

eaten=[]

for i in range(N):
    eaten.append(0)
    day=1
    while(1):
        if day <= D:
            eaten[i] += 1
            day += ary_A[i]
            continue
        else:
            break

#print eaten
print sum(eaten) + X

Submission status: Accepted

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

for i in range(n):
    ai = int(input())
    c = 1
    ans += 1
    while d >= c * ai + 1:
        ans += 1
        c += 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):
    tmp = int(input())
    n_tmp = ((D-1) // tmp) +1

    a += n_tmp
print(a+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=sum(A)
ANS=0
for K in range(N):
	W=0
	E=1
	while(E<=D):
		W+=1
		E=1+W*A[K]
		ANS+=1
print(ANS+X)

Submission status: Accepted

Solution code:
import sys

with sys.stdin as f:
    s_input = f.read()

    s_args = s_input.splitlines()
    n = int(s_args[0])
    dx = s_args[1].split()
    d = int(dx[0])
    x = int(dx[1])
    an = [int(sa) for sa in s_args[2:]]

    res = x
    for ai in an:
        res += (d-1) // ai + 1

    print(res)
        
sys.exit(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    N = int(input())
    D, X = list(map(int, (input().split(' '))))
    A = []
    for i in range(N):
        A.append(int(input()))
    snack_num = X
    for i in range(N):
        if A[i] == 1:
            snack_num += D
        elif D % A[i] == 0:
            snack_num += (D // A[i])
        else:
            snack_num += (D // A[i] + 1)
    print(snack_num)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

res = np.zeros(N)

for i in range(N):
    res[i] = (D-1) // int(input()) + 1

print(int(np.sum(res)+X))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
d,x = na()
a = []
for i in range(n):
    a.append(ni())

s = [1]*n
for i in range(n):
    for j in range(1,101):
        if a[i]*j + 1 <= d:
            s[i] += 1
        else:
            break
print(sum(s) + x)

Submission status: Accepted

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

for _ in xrange(n):
    ai = int(raw_input().strip())
    multi = 0
    while multi * ai + 1 <= d:
        x += 1
        multi += 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 += int(d / a)
    if d % a > 0:
        x += 1

print(int(x))

Submission status: Accepted

Solution code:
import math
import numpy as np
from operator import mul

# 整数Nを桁ごとのリストにする
# l = [int(x) for x in list(str(N))]

# 入力が文字のリスト
# S = list(input().split())

#入力が数字のリスト
# A = list(map(int, input().split()))

# 入力がリストのリスト
# S = [list(input()) for i in range(H)]


# リストliから重複を削除したリストli_uniqを作成
#li_uniq = []
#for i in li:
#    if x not in li_uniq:
#        li_uniq.append(x)

# 複数行のinput - list版
#list = [list(map(int, input().split())) for i in range(N)]
# 複数行のinput - dictionary版
# key = a, value = b
#for i in range(N):
#    a, b = map(int, input().split())
#    dict[a] = b


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

for i in range(N):
    X += (math.floor((D - 1)/A[i]) + 1)

print(X)

Submission status: Accepted

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

print(count+x)

Submission status: Accepted

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

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

choco = X

for i in A:
    if D % i == 0: 
        choco = choco + int(D/i) - 1 + 1
    else:
        choco = choco + int(D/i) + 1

print(choco)

Submission status: Accepted

Solution code:
#-*- coding:utf-8 -*-
import math
def how_many_choco(A, D):
    """ 何個チョコ食ったか返す
    nA + 1 <= Dを満たすnを求める
    """
    return math.floor((D-1)/A) + 1

if __name__ == "__main__":
    N = int(input())
    D, X = list(map(int, input().split()))
    eaten = 0
    for i in range(N):
        A = int(input())
        eaten += how_many_choco(A, D)
    print(X + eaten)

Submission status: Accepted

Solution code:
import math

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


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

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

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem B

if __name__ == '__main__':
    person_count = int(input())
    duration, x = map(int, input().split())
    a = [int(input()) for _ in range(person_count)]

    count = 0

    for i in a:
        y = 0

        while i * y + 1 <= duration:
            count += 1
            y += 1

    print(count + x)

Submission status: Accepted

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

sum = x
for a in array:
    j = 0
    while 1 + j * a <= d:
        sum += 1
        j += 1

print(sum)

Submission status: Accepted

Solution code:
import sys

N = int(input())

Tmp = []
Tmp = input().rstrip().split(' ')

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


Ans = 0
if D == 1:
    Ans = N + X
    print(Ans)
    sys.exit()

Count = 0
for i in range(N):
    K = int(input())
    TmpN = 1
    Flag = 0
    while Flag==0:
        TmpNum = K * (TmpN - 1) + 1
        if TmpNum > D:
            Flag = 1
            break
        else:
            Count += 1
        
        TmpN += 1

Ans = Count + 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()))

choco=[]
for i in range(N):
    choco.append((D-1)//A[i]+1)
print(sum(choco)+X)

Submission status: Accepted

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

chocos = dx[1]

for i in range(n):
    a = int(input())
    chocos += -(-dx[0] // a )
    
print(chocos)

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:
n = int(input())
d, x = map(int, input().split(' '))

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

print(x + cnt)

Submission status: Accepted

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

Submission status: Accepted

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

s = x

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

print(s)

Submission status: Accepted

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

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

total_days = []

for x in day_list:

    m = int((D-1)//x)
    m += 1

    total_days.append(m)

total_choco = sum(total_days) + X
print(total_choco)

Submission status: Accepted

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

    ans = X
    for i in range(N):
        for j in range(1, D+1, A[i]):
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
s = input().split(" ")
D = int(s[0])
X = int(s[1])
cnt = X
for i in range(N):
    s = int(input())
    n = int((D-1) / s) + 1
    cnt += n
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

#aは任意の人が食べた個数を記録するリスト
a=[]
for i in range(N):
    x=int(input())
    num=(D-1)//x
    a.append(num+1)
print(sum(a)+X)

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(X + eat)

Submission status: Accepted

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

for i in range(N):
	ai.append(int(input()))

counter = X;
diff = D-1;

for i in range(N):
	counter += diff//ai[i] + 1

print (counter);

Submission status: Accepted

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

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

print(s + X)

Submission status: Accepted

Solution code:
import numpy as np

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

a = np.zeros(n, np.int)
for i in range(n):
    a[i] = int(input())

for i in a:
    k = 1
    while(k <= d):
        x += 1
        k += i

print(x)

Submission status: Accepted

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

s = 0
for i in a:
    for j in range(1, d+1, i):
        s += 1
print(s+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b= input().split()
b,c = int(b[0]),int(b[1])
ii = []
for i in range(a):
    ii.append(int(input()))
sumcho = 0
for i in ii:
    sumcho += ((b-1) // i)+1 
print(sumcho+c)

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
    if D % a != 0:
        X += 1
print(X)

Submission status: Accepted

Solution code:

import sys

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    N = int(read_func().strip().split()[0])
    input_raw = read_func().strip().split()
    [D, X] = [int(input_raw[0]), int(input_raw[1])]
    s = 0
    for i in range(N):
        input_raw = read_func().strip().split()
        A = int(input_raw[0])
        s += (D - 1)/A + 1

    print s + X

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

ate = 0

for i,choc in enumerate(a):
    for j in range(d):
        if j%choc==0:
            ate+=1

print(ate+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

result = 0
for i in range(N):
    result += math.floor((D-1)/A[i]+1)

print(result+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
total = 0
# 日、残り
d, x = map(int, input().split())

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

print(total + x)

Submission status: Accepted

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

result = x

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

print(result)

Submission status: Accepted

Solution code:
n = int(input())

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

a = []

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

total = 0

for i in range(n):

    for j in range(d):
        if j % a[i] == 0:
            total += 1

total += x
print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b,c=map(int,input().split())
d=[]
for i in range(a):
	x=int(input())
	d.append(x)
sumx=c
j=0
while(j<a):
	k=1
	while(k<=b):
		sumx+=1
		k+=d[j]
	j+=1
print(sumx)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
B - Chocolate
https://beta.atcoder.jp/contests/abc092/tasks/abc092_b

"""
import sys
from sys import stdin
input = stdin.readline


def solve(N, D, X, A):
    ans = X
    for a in A:
        for i in range(1, D+1, a):
            ans += 1
    return ans


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


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

res = 0
for count in range(n):
    tmp = int(input())
    for i in range(1, d+1, tmp):
        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())
  A.append(a)

def solve(a,x):
  res=0
  cnt=0
  while cnt*a+1<=x:
    res+=1
    cnt+=1
  return res

ans=0
for i in range(N):
  ans+=solve(A[i],D)

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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 ai in a:
    ans += (d - 1) // ai + 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())
for i in range (0,N):
	a = int(input())
	j = 1
	while j <= D :
		j += a
		X += 1
print(X)

Submission status: Accepted

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

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

result = X

for ai in A:
    result += 1 + (D - 1) // ai

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

pre = len(A)
for a in A:
    pre += int((D-1)/a)

print(pre+X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D, X = list(map(int, input().split()))
A = [int(input()) for _ in range(N)]
result = X
for n in range(N):
    if D % A[n] == 0:
        result += (D // A[n])
    else:
        result += (D // A[n]) + 1
print(result)

Submission status: Accepted

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

print(Z+X)

Submission status: Accepted

Solution code:
import math

N = int(input())
D, X = map(int, input().split())
count = X
for n in range(N):
    a = int(input())
    count += math.ceil(D/a)
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(sum+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n=int(input())
d,x=map(int,input().split())
a=[]
choco=0
for i in range(n):
    a=int(input())
    choco+=1+d//a
    if(d%a==0):choco-=1
print(choco+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(len(A)):
    day = 1
    while day <= D:
        day += A[i]
        X += 1
print(X)

Submission status: Accepted

Solution code:
N = int(input())
input_array = list(map(int,input().split()))
day = input_array[0]
left = input_array[1]
out = 0
out += left

for i in range(N):
    temp = int(input())
    out += (1+int((day-1)/temp))


print(out)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

ans = 0
for a in A:
    ans += math.ceil(D / a)
print(ans + X)

Submission status: Accepted

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

print(x + num)

Submission status: Accepted

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

Submission status: Accepted

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

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

def eat(d, ai):
    res = 0
    for j in range(d):
        if j % ai == 0:
            res += 1
    return res

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

r = 0

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

print(r + X)

Submission status: Accepted

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b,c=input().split()
b=int(b)
c=int(c)
d=[int(input()) i in range(a)
   e=e+int((b-1)/d[i])+1
print(e)

Submission status: Runtime Error

Solution code:
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
from sys import flags
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
from sys import flags
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

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

print(x)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

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

print(x)

Submission status: Runtime Error

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

ans=0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
jfrom math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    n = ii()
    d, x = mi()
    a = []
    for i in range(n):
        tmp = ii()
        a.append(tmp)
    ans = 0
    for i in a:
        tmp = 1
        while tmp <= d:
            ans += 1
            tmp += i
    ans += x
    print(ans)


main()

Submission status: Runtime Error

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: Runtime Error

Solution code:
5
30 44
26
18
81
18
6

Submission status: Runtime Error

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: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
print(min(a, b) + min(c, d))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

count = 0
for i in range(1,d+1):
  for j in a:
    if (i-1)%a == 0:
      count += 1

print(count + n)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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