Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

# [時間、変数、処理の種類]をイベントに追加。処理の種類は1：工事開始、2：工事終了、3：判定
from heapq import *
def f(n,q):
    events = []
    ans = [-1] * q
    koji = []
    set_koji = set()
    for _ in range(n):
        s, t, x = map(int, input().split())
        events += [[s - x - 0.3, x, 1]]
        events += [[t - x - 0.7, x, 2]]
    for i in range(q):
        d = int(input())
        events += [[d, i, 3]]
    events.sort()
    for j, h, s in events:
        if s == 1:
            heappush(koji, h)
            set_koji.add(h)
        elif s == 2:
            set_koji.remove(h)
        else:
            while koji:
                if koji[0] in set_koji:
                    break
                heappop(koji)
            if koji:
                ans[h] = koji[0]
    print(*ans, sep="\n")

n, q = map(int, input().split())
f(n,q)


### FIXED CODE ###

import sys
from bisect import *

input = sys.stdin.readline

def f(n, q):
    xst = []
    for i in range(n):
        s, t, x = map(int, input().split())
        xst.append([x, s - x, t - x])
    xst.sort()

    ds = []
    for i in range(q):
        d = int(input())
        ds.append(d)

    ans = [-1] * q
    jump = [-1] * q

    for x, s, t in xst:
        i = bisect_left(ds, s)
        fi = bisect_left(ds, t)
        while i < fi:
            if jump[i] != -1:
                i = jump[i]
            else:
                ans[i] = x
                jump[i] = fi
                i += 1

    print(*ans, sep="\n")

n, q = map(int, input().split())
f(n, q)
### BUGGY CODE ###

K=input()
D=int(input())
#余り0,余り1,余り2,…,余り(D-1)
dp=[0]*D
mod=10**9+7
s=0
for i in range(len(K)):
  ndp=[0]*D
  #余りがjだったものは(j+d)%Dの余りに変わるので
  for j in range(D):
    for d in range(10):
      ndp[(j+d)%D]=(ndp[(j+d)%D]+dp[j])%mod
  #直前までKと数字が同じだったものをカウント
  for d in range(int(K[i])):
    ndp[(s+d)%D]+=1 
  dp=ndp
  s=(s+int(K[i]))%D
#0000…の場合を引き、もしもKが該当するなら1を加える
ans=dp[0]-1
if s%D==0:
  ans+=1
print(ans%mod)

### FIXED CODE ###

K=input()
D=int(input())
#余り0,余り1,余り2,…,余り(D-1)
dp=[0]*D
mod=10**9+7
s=0
for i in range(len(K)):
  ndp=[0]*D
  #余りがjだったものは(j+d)%Dの余りに変わるので
  for j in range(D):
    for d in range(10):
      ndp[(j+d)%D]=(ndp[(j+d)%D]+dp[j])%mod
  #直前までKと数字が同じだったものをカウント
  for d in range(int(K[i])):
    ndp[(s+d)%D]+=1 
  dp=ndp
  s=(s+int(K[i]))%D
print((dp[0]-1+(s==0))%mod)
### BUGGY CODE ###

from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
INF =  float("inf")
import bisect
import statistics
mod = 10**9+7

N = int(input())
s = input()

dp = [[0 for j in range(N+1)] for i in range(N+1)]
for j in range(1,N+1):
    dp[1][j] = 1

for i in range(2,N+1):
    a = list(itertools.accumulate(dp[i-1]))
    for j in range(1,N-i+2):
        if s[i-2] == "<":
            dp[i][j] = a[N-i+2] - a[j]
            # for k in range(1,N-i-j+3):
            #     dp[i][j] = (dp[i][j] + dp[i-1][j+k]) % mod
        else:
            dp[i][j] = a[j] - a[0]
            # for k in range(1,j+1):
            #     dp[i][j] = (dp[i][j] + dp[i-1][k]) % mod

print(dp[N][1] % mod)

### FIXED CODE ###

from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
INF =  float("inf")
import bisect
import statistics
mod = 10**9+7

N = int(input())
s = input()

dp = [[0 for j in range(N+1)] for i in range(N+1)]
for j in range(1,N+1):
    dp[1][j] = 1

for i in range(2,N+1):
    a = [0 for i in range(N-i+3)]
    for k in range(1,N-i+3):
        a[k] = (a[k-1] + dp[i-1][k]) % mod

    for j in range(1,N-i+2):
        if s[i-2] == "<":
            dp[i][j] = (a[N-i+2] - a[j]) % mod
            # for k in range(1,N-i-j+3):
            #     dp[i][j] = (dp[i][j] + dp[i-1][j+k]) % mod
        else:
            dp[i][j] = (a[j] - a[0]) % mod
            # for k in range(1,j+1):
            #     dp[i][j] = (dp[i][j] + dp[i-1][k]) % mod

print(dp[N][1] % mod)
### BUGGY CODE ###

n, k = map(int, input().split())
a = [int(x) for x in input().split()]
test = [n] * n

for i in range(k):
    tmp = [0] * n
    for j in range(n):
        for k in range(j - a[j], j + a[j] + 1):
            if k < 0 or n <= k:
                continue
            
            tmp[k] += 1
            
    a = tmp
    
    if a == test:
        print(i)
        break

for i in range(n):
    print(a[i], end=' ')

### FIXED CODE ###

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

for i in range(min(k, 450)):
    tmp = [0] * (n + 1)
    for j in range(n):
        tmp[max(0, j - a[j])] += 1
        tmp[min(n, j + a[j] + 1)] -= 1
    
    cnt = 0
    for j in range(n):
        cnt += tmp[j]
        a[j] = cnt

for i in range(n):
    print(a[i], end=' ')
### BUGGY CODE ###

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


for nums in B:
    A = [nums[1] if i == nums[0] else i for i in A]
    print(sum(A))


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
sum_res = sum(A)
counter = [0 for _ in range(10 ** 5 + 1)]

for a in A:
    counter[a] += 1

for _ in range(Q):
    B, C = map(int, input().split())
    sum_res = sum_res - (counter[B] * B)
    sum_res = sum_res + (counter[B] * C)
    counter[C] += counter[B]
    counter[B] = 0
    print(sum_res)
### BUGGY CODE ###

N=int(input())
a=list(map(int,input().split()))
A=list(set(a))
ans=0

for i in A:
    num = a.count(i)
    if num>i:
        ans+=num-i
    elif num<i:
        ans+=num

print(ans)

### FIXED CODE ###

from collections import Counter

N=int(input())
a=list(map(int,input().split()))
A=list(set(a))
ans=0
count = Counter(a)

for i in A:
    if count[i]>i:
        ans+=count[i]-i
    elif count[i]<i:
        ans+=count[i]

print(ans)
### BUGGY CODE ###

def resolve():
    n = int(input())
    dict = {}
    s = ["".join(sorted(input())) for _ in range(n)]
    for i in range(n):

        if s[i] in dict.keys():
            dict[s[i]] += 1
        else:
            dict[s[i]] =1
    ans = 0
    for i in dict.keys():
        ct = dict[i]
        ans += (ct*(ct-1))//2
    print(ans)

resolve()

### FIXED CODE ###

def resolve():
    n = int(input())
    s = [",".join(sorted(input())) for i in range(n)]
    ans = {}
    count = 0
    for i in range(n):
        if s[i] in ans:
            count += ans[s[i]]
            ans[s[i]] += 1
        else:
            ans[s[i]] = 1
    print(count)
resolve()
### BUGGY CODE ###

cnt = 0
s = []
tmp = []
n = int(input())
for i in range(n):
    string = input()
    string = ''.join(sorted(string))
    s.append(string)

for i, e in enumerate(s):
    """
    要素が何個あるか検査　AND　tmpにないやつ
    ・１：なにもしない
    ・2以上：個数調べてCNT更新。その要素をtmpに記録する
    """
    count = s.count(e)
    if count > 1 and not e in tmp:
        cnt += count*(count-1)//2
        tmp.append(e)
print(cnt)


### FIXED CODE ###

import collections

cnt = 0
s = []
tmp = []
n = int(input())
for i in range(n):
    string = input()
    string = ''.join(sorted(string))
    s.append(string)

# for i, e in enumerate(s):
#     count = s.count(e)
#     if count > 1 and not e in tmp:
#         cnt += count*(count-1)//2
#         tmp.append(e)
cc = collections.Counter(s)

for cv in cc.values():
    if cv > 1:
        cnt += cv*(cv-1)//2

print(cnt)
### BUGGY CODE ###

# -*- coding: utf-8 -*-
L, R = map(int, input().split())

ans = 2018
tmp = 0

for i in range(L, R):
	for j in range(i + 1, R + 1):
		tmp = (i * j) % 2019
		ans = min(tmp, ans)

print(ans)

### FIXED CODE ###

L, R = map(int, input().split())

ans = 2018
tmp = 0

for i in range(L, R):
	for j in range(i + 1, R + 1):
		tmp = (i * j) % 2019

		if tmp == 0:
			ans = tmp
			print(ans)
			exit()
		else:
			ans = min(tmp, ans)

print(ans)
### BUGGY CODE ###

from collections import defaultdict
from collections import deque
n , m = map(int , input().split())
g = defaultdict(list)
for i in range(m):
	u , v = map(int , input().split())
	g[u].append(v)
	g[v].append(u)
#print(g)
visited = [False]*(n+1)
a = [10**10]*(n+1)
q = deque()
q.append(1)
while q:
	node = q.popleft()
	visited[node] = True
	for ele in g[node]:
		if not visited[ele]:
			if a[ele] == 10**10: a[ele] = node
			q.append(ele)
#print(ans)
#print(a)
print("Yes")
for i in a[2:]:
	print(i)


### FIXED CODE ###

from collections import defaultdict
from collections import deque
n , m = map(int , input().split())
g = defaultdict(list)
for i in range(m):
	u , v = map(int , input().split())
	g[u].append(v)
	g[v].append(u)
#print(g)
visited = [False]*(n+1)
a = [10**10]*(n+1)
q = deque()
q.append(1)
while q:
	node = q.popleft()
	visited[node] = True
	for ele in g[node]:
		if not visited[ele]:
			if a[ele] != 10**10: 
				continue
			a[ele] = node
			q.append(ele)
#print(ans)
#print(a)
print("Yes")
for i in a[2:]:
	print(i)
### BUGGY CODE ###

N = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(N):
    if (i+1) % 2 == N % 2:
        ans = [a[i]] + ans
    else:
        ans = ans + [a[i]]
print(*ans, sep=" ")


### FIXED CODE ###

from collections import deque
N = int(input())
a = list(map(int, input().split()))
ans = deque([])
for i in range(N):
    if (i+1) % 2 == N % 2:
        ans.appendleft(a[i])
    else:
        ans.append(a[i])
print(*ans, sep=" ")
### BUGGY CODE ###

import sys

input = lambda: sys.stdin.readline().rstrip()
mod = 10**9 + 7


def comb(n, k, mod):

    m = 1
    for i in range(n, n - k, -1):
        m = m * i % mod

    n = 1
    for i in range(1, k + 1):
        n = n * i % mod

    return (m * pow(n, mod - 2, mod)) % mod


def solve():
    N, K = map(int, input().split())
    blue = K
    red = N - K

    # i == 0
    print(red + 1)

    # i >= 1
    for i in range(1, blue):
        c = comb(blue - 1, i, mod)
        t = 0
        for j in range(i - 1, red):
            t += comb(j, i - 1, mod) * (red - j)
            t %= mod
        ans = (c * t) % mod
        print(ans)


if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys

input = lambda: sys.stdin.readline().rstrip()
mod = 10**9 + 7


class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """

    def __init__(self, n_max, mod=10**9 + 7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n - r] % self.mod

    def make_factorial_list(self, n):
        fac = [1]
        facinv = [1]
        for i in range(1, n + 1):
            fac.append(fac[i - 1] * i % self.mod)
            facinv.append(facinv[i - 1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        modinv = [0] * (n + 1)
        modinv[1] = 1
        for i in range(2, n + 1):
            modinv[i] = self.mod - self.mod // i * modinv[self.mod % i] % self.mod
        return modinv


def solve():
    N, K = map(int, input().split())
    blue = K
    red = N - K
    comb = Combination(2000, mod)

    # i == 0
    print(red + 1)

    # i >= 1
    for i in range(1, blue):
        c = comb(blue - 1, i)
        t = 0
        for j in range(i - 1, red):
            t += comb(j, i - 1) * (red - j)
            t %= mod
        ans = (c * t) % mod
        print(ans)


if __name__ == '__main__':
    solve()
### BUGGY CODE ###

from functools import reduce
from fractions import gcd

n = int(input())
a = list(map(int, input().split()))
A = list(set(a))
ans = [reduce(gcd, A)]

if len(A) == 1:
    print(A[0])
    exit()
for i in a:
    b = sorted(A)
    b.remove(i)
    if a.count(i) == 1:
        ans.append(reduce(gcd, b))

print(max(ans))


### FIXED CODE ###

from functools import reduce
from fractions import gcd

n = int(input())
a = list(map(int, input().split()))
A = list(set(a))
ans = [reduce(gcd, A)]

if len(A) == 1:
    print(A[0])
    exit()
for i in A:
    b = sorted(A)
    b.remove(i)
    if a.count(i) == 1:
        ans.append(reduce(gcd, b))

print(max(ans))
### BUGGY CODE ###

N , M = map(int,input().split())
A = list(map(int,input().split()))

num = [0,2,5,5,4,5,6,3,7,6]
minnum = 10

# iけたをj本使ってできる最大値がdp[i][j]
dp = [-1000000000 for _ in range(20000)]
for i in range(1,10):
    if i in A:
        a = i
        dp[num[a]] = max(dp[num[a]],a)
        minnum = min(minnum,num[a])

for i in range(N//minnum+1):
    for j in range(N):
        for a in A:
            dp[j+num[a]] = max(dp[j+num[a]], 10 * dp[j] + a)
print(dp[N])


### FIXED CODE ###

n,m = map(int,input().split())
a = list(map(int,input().split()))

w = [2,5,5,4,5,6,3,7,6]

min_w = 10
for i in a:
    min_w = min(min_w,w[i-1])

dp = [0 for i in range(n+1)]


for i in range(0,n):
    if 1 <= i < min_w:
            dp[i] = -1
    for j in a:
        if i + 1 - w[j-1] >= 0 and dp[i + 1 - w[j-1]] != -1:
            dp[i+1] = max(dp[i+1],dp[i+1-w[j-1]]*10+j)
print(dp[n])
### BUGGY CODE ###

import math
from functools import reduce
import itertools
from scipy.special import comb

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
cnt = 0
b = list(range(1, k+1))
b = list(map(str, b))

c = itertools.combinations_with_replacement(b, 3)

c = list(c)

f = []
for i in range(len(c)):
    d = list(map(int, c[i]))
    dd = list(set(d))
    if len(dd) == 1:
        e = dd[0]
        cnt += e
    elif len(dd) == 2:
        e = gcd(*dd)
        cnt += e*3
    else:
        e = gcd(*d)
        cnt += e*6

print(cnt)

### FIXED CODE ###

from math import gcd
K = int(input())
sum = 0
for a in range(K):
    for b in range(K):
        g = gcd(a + 1, b + 1)
        for c in range(K):
            sum += gcd(g, c + 1)
print(sum)
### BUGGY CODE ###

import functools
import operator
N=int(input())
A=list(map(int,input().split()))
prod = functools.partial(functools.reduce, operator.mul)
ans=prod(A)
if ans > 10**18:
    ans = -1
print(ans)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
        if ans > 10**18:
            ans = -1
            break
print(ans)
### BUGGY CODE ###

s = input()

li_1 = [1] * len(s)

for i in range(1000):
    li_2 = [0] * len(s)
    for j in range(len(s)):
        if s[j] == 'R':
            li_2[j+1] += li_1[j]
        elif s[j] == 'L':
            li_2[j-1] += li_1[j]
    li_1 = li_2

for i in li_1:
    print(i, end=' ')



### FIXED CODE ###

from math import ceil
from math import floor
import itertools

s = input()
n = len(s)
t = []

def output(r_cnt, l_cnt):
    global t
    r_num = ceil(r_cnt/2) + floor(l_cnt/2)
    l_num = ceil(l_cnt/2) + floor(r_cnt/2)
    x = [0 for _ in range(r_cnt + l_cnt)]
    x[r_cnt-1] = r_num
    x[r_cnt] = l_num
    t.append(x)


r_cnt = 0
l_cnt = 0
for i in range(n-1):
    if s[i] == 'R':
        r_cnt += 1
    elif s[i] == 'L':
        l_cnt += 1
    if s[i] == 'L' and s[i+1] =='R' or i == n-2:
        if i == n-2:
            l_cnt += 1
        output(r_cnt, l_cnt)
        r_cnt = 0
        l_cnt = 0


t = list(itertools.chain.from_iterable(t))
for i in t:
    print(i, end=' ')
### BUGGY CODE ###

# -*- coding: utf-8 -*-
a = list(map(int,input().split()))

n = a[0]
k = a[1]
p = list(map(int,input().split()))

e = [(pi+1)/2 for pi in p]

ret = []
for i in range(n-(k-1)):
        b = 0.0
        for j in range(k):
                b += e[i+j]
        ret.append(b)

ret.sort()
print(ret[n-k])

### FIXED CODE ###

# -*- coding: utf-8 -*-
a = list(map(int,input().split()))

n = a[0]
k = a[1]
p = list(map(int,input().split()))

e = [(pi+1)/2 for pi in p]

ret2 = []
b = 0.0
for j in range(k):
        b += e[j]
ret2.append(b)

for i in range(n-k):
        ret2.append(ret2[i] - e[i] + e[i+k])

ret=ret2

ret.sort()
print(ret[n-k])
### BUGGY CODE ###

import math

def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = math.gcd(a,l[i])
    return a

K = int(input())
list_A=[]
for i in range(K):
    for j in range(K):
        for k in range(K-1):
            #print(gcdlist([i+1,j+1,k+2]))
            list_A.append(gcdlist([i+1,j+1,k+2]))
print(sum(list_A)+K**2)

### FIXED CODE ###

import math


K = int(input())
S=0
for i in range(1,K+1):
    for j in range(1,K+1):
        s=math.gcd(i,j)
        for k in range(1,K+1):
            S += math.gcd(s,k)

print(S)
### BUGGY CODE ###

P, N = list(map(int, input().split()))
arr = list(map(int, input().split()))
arr.sort()
mn = arr[-1] - arr[0]
for i in range(N):
    val = arr.pop(0)
    arr.append(val + P)
    mn = min([mn, arr[-1] - arr[0]])
print(mn)


### FIXED CODE ###

P, N = list(map(int, input().split()))
arr = list(map(int, input().split()))
mn = 100000000
l, r = 0, len(arr) - 1
for i in range(N):
    if (arr[r] - arr[l]) < mn:
        mn = arr[r] - arr[l]
    arr[l] += P
    l = (l + 1) % N
    r = (r + 1) % N
print(mn)
### BUGGY CODE ###

N = int(input())
a = list(map(int,input().split()))
x = 0
y = 0
min = abs(sum(a[0:1])-sum(a[1:N]))
for i in range(3,N):
    x = sum(a[0:i])
    y = sum(a[i:N])
    if abs(x-y) <= min:
        min = abs(x-y)
print(min)


### FIXED CODE ###


N = int(input())
a = list(map(int,input().split()))
x = a[0]
y = sum(a[1:])
ans = abs(x-y)
for i in range(1,N-1):
    x += a[i]
    y -= a[i]
    ans = min(abs(x-y),ans)

print(ans)
### BUGGY CODE ###

import bisect
#abs(a-b)<c<a+b
N=int(input())
L=sorted([int(i) for i in input().split()])
ans=0
#print(L)
for i in range(N):
    for j in range(i+1,N):
        A=bisect.bisect_left(L,L[i]+L[j])
        B=bisect.bisect_right(L,abs(L[i]-L[j]))
        tmp=A-B
        if B<=i<A:
            tmp-=1
        if B<=j<A:
            tmp-=1
        ans+=tmp
        #print(i,j,A,B,tmp)
print(ans//3)
        


### FIXED CODE ###

import bisect
#abs(a-b)<c<a+b
N=int(input())
L=sorted([int(i) for i in input().split()])
ans=0
#print(L)
for i in range(N):
    for j in range(i+1,N):
        A=bisect.bisect_left(L,L[i]+L[j])
        B=bisect.bisect_right(L,abs(L[i]-L[j]))
        tmp=A-B
        if B<=i<A:
            tmp-=1
        if B<=j<A:
            tmp-=1
        ans+=tmp
        #print(i,j,A,B,tmp)
print(ans//3)
### BUGGY CODE ###

import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

from collections import defaultdict, deque
Dirc = ('U', 'D', 'R', 'L')
Dirc2 = ('D', 'U', 'L', 'R')
dircn = ((1, 0), (-1, 0), (0, 1), (0, -1))
blocked = defaultdict(int)
sx, sy, tx, ty = mapint()

ans = []
for i in range(4):
    queue = deque([(sx, sy, [])])
    checked = defaultdict(int)
    dirc = Dirc if i%2==0 else Dirc2
    while queue:
        x, y, lis = queue.popleft()
        lis = lis[:]
        flg = 0
        for d, (dy, dx) in zip(dirc, dircn):
            nx, ny = x+dx, y+dy
            if checked[(nx, ny)] or blocked[(nx, ny)]:
                continue
            if nx==sx and ny==sy:
                continue
            if nx==tx and ny==ty:
                flg = 1
                lis.append(d)
                break
            queue.append((nx, ny, lis+[d]))
            checked[(nx, ny)] = 1
        if flg:
            x, y = sx, sy
            for s in lis[:-1]:
                dy, dx = dircn[dirc.index(s)]
                x += dx
                y += dy
                blocked[(x, y)] = 1
            if i%2==0:
                lis = list(reversed(lis))
            ans.extend(lis)
            break
print(''.join(ans))

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

sx, sy, tx, ty = mapint()
ans = ''

ans += 'U'*(ty-sy) + 'R'*(tx-sx)
ans += 'D'*(ty-sy) + 'L'*(tx-sx)
ans += 'L'+'U'*(ty-sy+1)+'R'*(tx-sx+1)+'D'
ans += 'R'+'D'*(ty-sy+1) + 'L'*(tx-sx+1)+'U'

print(ans)
### BUGGY CODE ###

import sys
import math
L = []

N = int(input())

str_list = list(map(int,input().split()))

sum0 = 1

for n in range(0,N):
    sum0 = sum0 * str_list[n]
if sum0 > 10**18:
    print(-1)
else:
    print(sum0)

### FIXED CODE ###

N = int(input())

str_list = list(map(int,input().split()))

sum0 = str_list[0]

for n in range(0,N):
    if str_list[n] == 0:
        sum0 = 0

for n in range(1,N):
    if sum0 == 0:
        break
    sum0 = sum0 * str_list[n]
    if sum0 > 10 ** 18:
        sum0 = -1
        break

print(sum0)
### BUGGY CODE ###

N,K,Q = map(int,input().split())
p = [K]*N

for i in range(Q):
    A = int(input())
    p = [n-1 for n in p]
    p[A-1] = p[A-1] + 1
for i in p:
    if i <= 0:
        print("No")
    else:
        print("Yes")

### FIXED CODE ###

N,K,Q = map(int,input().split())
p = [K-Q]*N

for i in range(Q):
    A = int(input())
    p[A-1] = p[A-1] + 1
for i in p:
    if i <= 0:
        print("No")
    else:
        print("Yes")
### BUGGY CODE ###

from functools import reduce

def gcd(a,b):
    if a < b:
        a, b = b, a
    while a % b != 0:
        a, b = b, a % b
    return b

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
A = list(map(int,input().split()))
B = 0
div = 10**9+7

lcm_A = lcm_list(A)

for item in A:
    B+=(lcm_A//item)

print(B%div)


### FIXED CODE ###

from functools import reduce
import fractions

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
A = list(map(int,input().split()))
B = 0
div = 10**9+7

lcm_A = lcm_list(A)

for item in A:
    B+=(lcm_A//item)

print(B%div)
### BUGGY CODE ###

n,k = map(int,input().split())
A=[*map(int,input().split())]
# print(n,k)
# print(A)
# B = []
m = min({19,k,n})
# B = [[0]*n for _ in range(m+1)]
# B[0] = A
# print('m',m)
# print(B)
for i in range(m):

    # print(i,B)
    B = [0]*n

    for j in range(n):
        d = A[j] # 強さ
        l = max(0, j-d) # 範囲
        r = j+d+1 # 範囲
        # print('j,d,l,r',j,d,l,r)
        B[l] += 1
        if r <= n-1: B[r] -= 1

    for j in range(n-1):
        B[j+1] = B[j+1] + B[j]
    A = B

# print('---')
# print(B)
# for i in range(n-1):
#     B[i+1] = B[i+1] + B[i]
# print(B)
print(*B,sep=' ')
# print(A)
# print(*A, sep=' ')


### FIXED CODE ###

n,k = map(int,input().split())
A=[*map(int,input().split())]
for i in range(k):
    B = [0]*n
    for j in range(n):
        d = A[j] # 強さ
        l = max(0, j-d) # 範囲
        r = j+d+1 # 範囲
        B[l] += 1
        if r <= n-1: B[r] -= 1
    is_same = True
    for j in range(n-1):
        B[j+1] = B[j+1] + B[j]
        if B[j+1] != n: is_same = False
    # print(B)
    if is_same: break
    A = B
# print(B)
print(*B,sep=' ')