Harryxun/stf_run huggingface dataset:
f_memo = {0:1, 1:1}
def f(x):
  global f_memo
  if x in f_memo:
    return f_memo[x]
  else:
    res = x * f(x-1)
    f_memo[x] = res
    return res

comb_memo = {}
def comb(n, r):
  global comb_memo
  if (n, r) in comb_memo:
    return comb_memo[(n, r)]
  else:
    a = f(n)
    b = f(n-r)
    c = f(r)
    res = a // b // c
    comb_memo[(n, r)] = res
    return res


N, A, B = map(int, input().split())
v = list(map(int, input().split()))
v.sort(reverse=True)

mu = sum(v[:A]) / A
R = A-1
for i in range(A, N):
  if v[i] == mu:
    R = i
  else:
    break

R += 1
ans = 0
if R > A:
  for i in range(A, B+1):
    ans += comb(R, i)
else:
  min_v = v[A-1]
  n = v.count(min_v)
  need = v[:A].count(min_v)
  ans += comb(n, need)

print(mu)
print(ans)

### FIXED CODE ###

comb_memo = {}
def comb(n, r):
  global comb_memo
  if (n, r) in comb_memo:
    return comb_memo[(n, r)]
  else:
    r = min(r, n-r)
    res = 1
    for _ in range(r):
      res *= n
      n -= 1
    for i in range(1, r+1):
      res //= i
    comb_memo[(n, r)] = res
    comb_memo[(n, n-r)] = res
    return res

N, A, B = map(int, input().split())
v = list(map(int, input().split()))
v.sort(reverse=True)

mu = sum(v[:A]) / A
ans = 0
if v[0] == mu:
  R = v.count(v[0])
  for i in range(A, B+1):
    if i > R:
      break
    ans += comb(R, i)
else:
  min_v = v[A-1]
  n = v.count(min_v)
  need = v[:A].count(min_v)
  ans += comb(n, need)

print(mu)
print(ans)
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
        cnt=0
        while temp%i==0:
            cnt+=1
            temp //= i
        arr.append([i, cnt])

if temp!=1:
    arr.append([temp, 1])

if arr==[]:
    arr.append([n, 1])

if arr==[[1,1]]:
    print(0)

else:
    # print(arr)
    total=0
    for i in range(len(arr)):
        x=1
        s=0
        c=-1
        while s<=arr[i][1]:
            s+=x
            x+=1
            c+=1
        total+=c
    print(total)


### FIXED CODE ###

n=int(input())

arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
        cnt=0
        while temp%i==0:
            cnt+=1
            temp //= i
        arr.append([i, cnt])

if temp!=1:
    arr.append([temp, 1])

if arr==[]:
    arr.append([n, 1])

if arr==[[1,1]]:
    print(0)

else:
    total=0
    for i in range(len(arr)):
        x=1
        s=0
        c=-1
        while s<=arr[i][1]:
            s+=x
            x+=1
            c+=1
        total+=c
    print(total)
n,t=map(int,input().split())
l=[]
for i in range(n):
	c,time=map(int,input().split())
	if time<=t:
		l.append(c)
print(min(l))

### FIXED CODE ###

n,t=map(int,input().split())
l=[]
ans="TLE"
for i in range(n):
	c,time=map(int,input().split())
	if time<=t:
		l.append(c)
		ans=str(min(l))
print(ans)
s = list(int(input()))
print(s[1::2])


### FIXED CODE ###

s = input()
print(s[::2])
n=int(input())
for i in range(1,n+1):
  m*=i
print(m%1000000007)

### FIXED CODE ###

import math
n = int(input())
print(math.factorial(n) % (10**9+7))
n = int(input())
a = list(map(int,input().split()))
a.sort()
l = [0]*(10**6)

for i in a:
  if l[i] == 0:
    l[i] = 1
    for j in range(i*2,max(a)+1,i):
      l[j] = -1
  elif l[i] == 1:
    l[i] = -1
print(l.count(1))

### FIXED CODE ###

n = int(input())
a = sorted(map(int, input().split()))
l = [0]*(10**6+1)
M = max(a)

for i in a:
  if l[i] == 0:
    l[i] = 1
    for j in range(i*2, M+1, i):
      l[j] = -1
  else:
    l[i] = -1
print(l.count(1))
# from itertools import product

INF = 10**18

N, M = map(int, input().split())
XYZ = [list(map(int, input().split())) for _ in range(N)]

# i番目までのケーキの内、j個食べた時のpointの最大値
# (ただしpointの計算時には、8通りのmaskを乗算する)

def mul_mask(l, mask):
    return [a*b for a, b in zip(l, mask)]

dp_std = [[-INF for _ in range(M+1)] for _ in range(N+1)]
for i in range(N+1):
    dp_std[i][0] = 0
# print(dp_std)

max_p = -INF
# masks = product([-1, 1], repeat=3)
masks = []
for i in [1, -1]:
    for j in [1, -1]:
        for k in [1, -1]:
            masks.append([i, j, k])
for mask in masks:
    dp = dp_std.copy()
    for i in range(1, N+1):
        score = sum(mul_mask(XYZ[i-1], mask))
        for j in range(1, M+1):
            # print(i, j, XYZ[i-1], mask)
            dp[i][j] = max(
                dp[i-1][j],
                dp[i-1][j-1] + score
            )
            # for dp_i in dp:
            #     print(dp_i)
    p = dp[N][M]
    max_p = max(max_p, p)
    # print(p)

print(max_p)

### FIXED CODE ###

# from itertools import product

INF = 10**18

N, M = map(int, input().split())
XYZ = [list(map(int, input().split())) for _ in range(N)]

# i番目までのケーキの内、j個食べた時のpointの最大値
# (ただしpointの計算時には、8通りのmaskを乗算する)

def mul_mask(l, mask):
    p = []
    for i, m in enumerate(l):
        p.append(m*mask[i])
        # print(p)
    return p
    # return [a*b for a, b in zip(l, mask)]

dp_std = [[-INF for _ in range(M+1)] for _ in range(N+1)]
for i in range(N+1):
    dp_std[i][0] = 0
# print(dp_std)

max_p = -INF
# masks = product([-1, 1], repeat=3)
masks = []
for i in [1, -1]:
    for j in [1, -1]:
        for k in [1, -1]:
            masks.append([i, j, k])
# print(masks)
for mask in masks:
    dp = dp_std[:]
    for i in range(1, N+1):
        score = sum(mul_mask(XYZ[i-1], mask))
        for j in range(1, M+1):
            # print(i, j, XYZ[i-1], mask)
            dp[i][j] = max(
                dp[i-1][j],
                dp[i-1][j-1] + score
            )
            # for dp_i in dp:
            #     print(dp_i)
    p = dp[N][M]
    max_p = max(max_p, p)
    # print(p)

print(max_p)
import math

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

def cal(lis,x):
    an = 0
    for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
    return an

left = 0
right = 10**9

for i in range(100):
    m = (left + right) // 2
    
    b = cal(a,m)
    
    if b > k:
        left = m
    else:
        right = m
        
print(m+1)

### FIXED CODE ###

import math

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

def cal(lis,x):
    an = 0
    for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
    return an

left = 0
right = 10**9

for i in range(100):
    m = (left + right) / 2
    
    b = cal(a,m)
    
    if b > k:
        left = m
    else:
        right = m
        
print(math.ceil(m))
import math
N = int(input())
ai = list(map(int, input().split()))
m = 1
ans = 0
for a in ai:
    m = (m * a) // math.gcd(m, a)
m -= 1
for a in ai:
    ans += m % a
    
print(ans)


### FIXED CODE ###

import fractions
N = int(input())
ai = list(map(int, input().split()))
m = 1
ans = 0
for a in ai:
    m = (m * a) // fractions.gcd(m, a)
m -= 1
for a in ai:
    ans += m % a

print(ans)
from collections import deque
H,W=map(int,raw_input().split())
c=[]
for i in range(H):
	s=list(raw_input())
	for j in s:
		if j=="#":
			c.append(1)
		else:
			c.append(0)


nl=[ [] for i in range(H*W)]

p0=[-1,1,3]
p1=[-3,1,3]
p2=[-3,-1,3]
p3=[-3,-1,1]
p4=[-3,-1,1,3]
for i in range(H*W):
	if c[i]==0:
		if i==0:
			if c[i+1]==0:nl[i].append(i+1)
			if c[i+W]==0:nl[i].append(i+W)
		elif i==W-1:
			if c[i-1]==0:nl[i].append(i-1)
			if c[i+W]==0:nl[i].append(i+W)
		elif i==W*(H-1):
			if c[i-W]==0:nl[i].append(i-W)
			if c[i+1]==0:nl[i].append(i+1)		
		elif i==W*H-1:
			if c[i-W]==0:nl[i].append(i-W)
			if c[i-1]==0:nl[i].append(i-1)
		elif i<W-1:
			for j in p0:
				if c[i+j]==0:nl[i].append(i+j)			
		elif i%W==0:
			for j in p1:
				if c[i+j]==0:nl[i].append(i+j)	
		elif i%W==W-1:
			for j in p2:
				if c[i+j]==0:nl[i].append(i+j)
		elif i>W*(H-1):
			for j in p3:
				if c[i+j]==0:nl[i].append(i+j)
		else:
			for j in p4:
				if c[i+j]==0:nl[i].append(i+j)
				

V=[ None for i in range(H*W)]

def dfs(start):
	q = deque([]) 
	V[start]=1
	q.append(start)

	while len(q)!=0:
		v=q.pop()
		V[v]=1
		if H*W-1 in nl[v]:
			V[H*W-1]=1
			return

		for i in nl[v]:
			if V[i] is None:
				q.append(i)

dfs(0)
print len( filter(lambda x:x is None, V) ) - sum(c)




### FIXED CODE ###

from collections import deque
H,W=map(int,raw_input().split())
c=[]
for i in range(H):
	s=list(raw_input())
	for j in s:
		if j=="#":
			c.append(1)
		else:
			c.append(0)


nl=[ [] for i in range(H*W)]

p0=[-1,1,W]
p1=[-W,1,W]
p2=[-W,-1,W]
p3=[-W,-1,1]
p4=[-W,-1,1,W]
for i in range(H*W):
	if c[i]==0:
		if i==0:
			if c[i+1]==0:nl[i].append(i+1)
			if c[i+W]==0:nl[i].append(i+W)
		elif i==W-1:
			if c[i-1]==0:nl[i].append(i-1)
			if c[i+W]==0:nl[i].append(i+W)
		elif i==W*(H-1):
			if c[i-W]==0:nl[i].append(i-W)
			if c[i+1]==0:nl[i].append(i+1)		
		elif i==W*H-1:
			if c[i-W]==0:nl[i].append(i-W)
			if c[i-1]==0:nl[i].append(i-1)
		elif i<W-1:
			for j in p0:
				if c[i+j]==0:nl[i].append(i+j)			
		elif i%W==0:
			for j in p1:
				if c[i+j]==0:nl[i].append(i+j)	
		elif i%W==W-1:
			for j in p2:
				if c[i+j]==0:nl[i].append(i+j)
		elif i>W*(H-1):
			for j in p3:
				if c[i+j]==0:nl[i].append(i+j)
		else:
			for j in p4:
				if c[i+j]==0:nl[i].append(i+j)


V=[ None for i in range(H*W)]
d=[ float("inf") for i in range(H*W) ]

def bfs(start):
	q = deque([]) 
	V[start]=1
	d[start]=0
	q.append(start)

	while len(q)!=0:
		v=q.popleft()
		for i in nl[v]:
			if V[i] is None:
				V[i]=1
				q.append(i)
				d[i]=d[v]+1

bfs(0)

if V[H*W-1] is None:
	print -1
else:
	print H*W-(d[H*W-1]+1)-sum(c)
s = input()
s = s.split("/")

if s[0] >= 2019 and s[1] >= 5:
  print("TBD")
else:
  print("Heisei")

### FIXED CODE ###

s = input()
s = s.split("/")

if int(s[0]) >= 2019 and int(s[1]) >= 5:
  print("TBD")
else:
  print("Heisei")
s = input()
y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:10])
if y > 2019:
    print("TBD")
elif y=2019 and	m>4:
    print("TBD")
else:
    print("Heisei")

### FIXED CODE ###

s = input()
y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:10])
if y > 2019:
    print("TBD")
elif y==2019 and	m>4:
    print("TBD")
else:
    print("Heisei")
import sys
input=sys.stdin.readline

def BellmanFord(Edges,num_v,source):
    inf=float('inf')
    dist=[inf for _ in range(num_v)]
    dist[source]=0
    for i in range(num_v):
        for edge in Edges:
            if edge[0]!=inf and dist[edge[1]]>dist[edge[0]]+edge[2]:
                dist[edge[1]]=dist[edge[0]]+edge[2]
                if i==num_v-1:
                    before_dist=dist[num_v-1]
                    for i in range(num_v):
                        for edge in edges:
                            if edge[0]!=inf and dist[edge[1]] > dist[edge[0]]+edge[2]:
                                dist[edge[1]]=dist[edge[0]]+edge[2]
                    if before_dist!=dist[num_v-1]:
                        return -1
    return dist

n,m,p=map(int,input().split())
Edges=[]
for _ in range(m):
    a,b,c=map(int,input().split())
    a-=1; b-=1
    Edges.append((a,b,-(c-p)))
d=BellmanFord(Edges,n,0)
print(-1 if d==-1 else max(0,-d[-1]))

### FIXED CODE ###

import sys
input=sys.stdin.readline

def BellmanFord(Edges,num_v,source):
    inf=float('inf')
    dist=[inf for _ in range(num_v)]
    dist[source]=0
    for i in range(num_v):
        for edge in Edges:
            if edge[0]!=inf and dist[edge[1]]>dist[edge[0]]+edge[2]:
                dist[edge[1]]=dist[edge[0]]+edge[2]
                if i==num_v-1:
                    before_dist=dist[num_v-1]
                    for i in range(num_v):
                        for edge in Edges:
                            if edge[0]!=inf and dist[edge[1]] > dist[edge[0]]+edge[2]:
                                dist[edge[1]]=dist[edge[0]]+edge[2]
                    if before_dist!=dist[num_v-1]:
                        return -1
    return dist

n,m,p=map(int,input().split())
Edges=[]
for _ in range(m):
    a,b,c=map(int,input().split())
    a-=1; b-=1
    Edges.append((a,b,-(c-p)))
d=BellmanFord(Edges,n,0)
print(-1 if d==-1 else max(0,-d[-1]))
n,a,b = map(int, input().split())
print(min(n*a,b)

### FIXED CODE ###

n,a,b = map(int, input().split())
print(min(n*a,b))
N, K, Q = [int(x) for x in input().split(' ')]
points = [0 for x in range(N)]

for q in range(Q):
  index = int(input())-1
  points[index] += 1

for n in range(N):
  print('Yes' if (Q-points[n]) < K else 'No')

### FIXED CODE ###

d = {'Sunny':1, 'Cloudy':2, 'Rainy':0}
l = ['Sunny', 'Cloudy', 'Rainy']

input_s = input()

output_s = l[d[input_s]]

print(output_s)
#N = int(input())
N, M =  map(int,input().split())
#W =list(map(int,input().split()))
a = [(int(input())) for i in range(M)]

memo  =[-1]*(N+2)
def stair_count(n):
    if memo[n]!= -1:
        return memo[n]
    if n==0 or n==1:
        memo[n] =1
        return memo[n]
    memo[n] = stair_count(n-1) + stair_count(n-2)
    return memo[n]

start = 0
answer = 1
for i in a:
        if i == start:
            print(0)
            exit()
        else:
            n = i-1-start
            answer = (answer * stair_count(n))
            start = i+1
n = N -start
answer = (answer * stair_count(n))
print(answer%1000000007)


### FIXED CODE ###

#N = int(input())
N, M =  map(int,input().split())
#W =list(map(int,input().split()))
a = [(int(input())) for i in range(M)]

import sys

sys.setrecursionlimit(100000)
memo  =[-1]*(N+2)
def stair_count(n):
    if memo[n]!= -1:
        return memo[n]
    if n==0 or n==1:
        memo[n] =1
        return memo[n]
    memo[n] = stair_count(n-1) + stair_count(n-2)
    return memo[n]

start = 0
answer = 1
for i in a:
        if i == start:
            print(0)
            exit()
        else:
            n = i-1-start
            answer = (answer * stair_count(n))
            start = i+1
n = N -start
answer = (answer * stair_count(n))
print(answer%1000000007)
l={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(s[input()])

### FIXED CODE ###

l={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(l[input()])
# -*- coding: utf-8 -*-


def simu(pro, q):
    end_time = 0

    while bool(pro):
        if pro[1] > q:
            end_time += q
            pro.append(pro[0])
            pro.append(pro[1] - q)
            pro.pop(0)
            pro.pop(1)

        elif pro[1] <= q:
            end_time += pro[1]
            print('{0} {1}'.format(pro[1], end_time))
            pro.pop(0)
            pro.pop(1)


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

pro = []
for i in range(n):
    name, time = list(input().split())
    pro.append(name)
    pro.append(int(time))
    
simu(pro, q)



### FIXED CODE ###

# -*- coding: utf-8 -*-


def simu(pro, q):
    end_time = 0

    while bool(pro):
        if pro[1] > q:
            end_time += q
            pro.append(pro[0])
            pro.append(pro[1] - q)
            pro.pop(0)
            pro.pop(0)

        elif pro[1] <= q:
            end_time += pro[1]
            print('{0} {1}'.format(pro[0], end_time))
            pro.pop(0)
            pro.pop(0)


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

pro = []
for i in range(n):
    name, time = list(input().split())
    pro.append(name)
    pro.append(int(time))

simu(pro, q)
import sys
sys.setrecursionlimit(int(1e6))
import math

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

if N > M:
    A.sort(reverse=True)
    A1 = A[0:M]
    A2 = A[M:]
    for _ in range(M):
        i = A1.index(max(A1))
        A1[i] = A1[i] // 2
    print(sum(A1, A2))
else:
    for _ in range(M):
        i = A.index(max(A))
        A[i] = A[i] // 2
    print(sum(A))


### FIXED CODE ###

import sys
sys.setrecursionlimit(int(1e6))

import heapq

N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
h_A = []
for a in A:
    heapq.heappush(h_A, -a)

for _ in range(M):
    x = heapq.heappop(h_A)
    heapq.heappush(h_A, -(-x // 2))

prices = [- heapq.heappop(h_A) for _ in range(N)]
print(sum(prices))
input = input().split(" ")
N = (int)input[0]
L = (int)input[1]

inputs = []
for n in range(N):
  inputs.append(input())

inputs.sort()

answer = "".join(inputs)
print(answer)

### FIXED CODE ###

inputNL = input().split(" ")
N = int(inputNL[0])
L = int(inputNL[1])
 
inputs = []
for n in range(N):
  inputs.append(input())
 
inputs.sort()
answer = "".join(inputs)
print(answer)
N,K = map(int,input().split())

D = set(map(int,input().split()))
A = {1,2,3,4,5,6,7,8,9,0}
N_list = [int(c) for c in str(N)]

use = sorted(list(A - D))

ans = [max(use) for i in range(len(N_list))]
mapans = map(str,ans)
x = int(''.join(mapans))
if N == x:
    print(x)
elif N > x:
    if use[0]!= 0:
        ans = [use[0] for i in range(len(N_list)+1)]
    else:
        ans = [use[0] for i in range(len(N_list))+1]
        ans[0] = use[1]

    mapans = map(str,ans)
    x = int(''.join(mapans))
else:
    if use[0]!= 0:
        ans = [use[0] for i in range(len(N_list))]
    else:
        ans = [use[0] for i in range(len(N_list))]
        ans[0] = use[1]

    mapans = map(str,ans)
    x = int(''.join(mapans))
    j = 0
    i = 0
    print(x)
    while x < N:
        if ans[j] > N_list[j]:
            for k in range(len(ans)-j-1):
                ans[k] = min(use)
        elif ans[j] == N_list[j]:
            i = 0
            j+=1
        else:
            ans[j] = use[i]
            # i += 1
            # print(use)
            # print(ans[j])
    mapans = map(str,ans)
    x = int(''.join(mapans))

    print(x)


### FIXED CODE ###

N,K = map(int,input().split())

D = set(map(int,input().split()))
A = {1,2,3,4,5,6,7,8,9,0}
N_list = [int(c) for c in str(N)]

use = sorted(list(A - D))

ans = [max(use) for i in range(len(N_list))]
mapans = map(str,ans)
x = int(''.join(mapans))
if N == x:
    print(x)
elif N > x:
    if use[0]!= 0:
        ans = [use[0] for i in range(len(N_list)+1)]
    else:
        ans = [use[0] for i in range(len(N_list)+1)]
        ans[0] = use[1]

    mapans = map(str,ans)
    x = int(''.join(mapans))
    print(x)
else:
    if use[0]!= 0:
        ans = [use[0] for i in range(len(N_list))]
    else:
        ans = [use[0] for i in range(len(N_list))]
        ans[0] = use[1]

    mapans = map(str,ans)
    x = int(''.join(mapans))
    j = 0
    i = 0
    while x < N:
        if ans[j] > N_list[j]:
            for k in range(len(ans)-j-1):
                ans[k] = min(use)
        elif ans[j] == N_list[j]:
            i = 0
            j+=1
        else:
            i += 1
            ans[j] = use[i]
        mapans = map(str,ans)
        x = int(''.join(mapans))

    print(x)
l = map(int,raw_input().split())
s = l[0] * l[1]
shu = l[0] * 2 + l[1] * 2
print(str(s) + " " + str(shu))

### FIXED CODE ###

a,b = list(map(int, input().split()))

s = a * b
shu = a * 2 + b * 2
fmt = "{s} {shu}"
s = fmt.format(s = s,shu = shu)
print(s)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from itertools import chain
from functools import reduce, lru_cache
from collections import OrderedDict, Counter, deque

import sys
sys.setrecursionlimit(1024)

N, M = map(int, input().split())
A = [int(x) for x in input().split()]

ntom = [0,2,5,5,4,5,6,3,7,6]

mtoa = {}
for a in A:
    m = ntom[a]
    mtoa.setdefault(m, []).append(a)

ms = mtoa.keys()
dp = [None] * (N+1)
dp[0] = 0
for i in ms:
    dp[i] = 1
for i in range(2, N+1):
    x = [dp[i-x] for x in ms if i > x and dp[i-x]]
    if x:
        dp[i] = max(x) + 1

mms = sorted([(max(y),x) for x, y in mtoa.items()], reverse=True)
ans = ''
left = N
while left:
    for v,m in mms:
        if left >= m and dp[left - m] is not None and  dp[left] == dp[left - m] + 1:
            left -= m
            ans += str(v)
            break
        
print(ans)

### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

N, M = map(int, input().split())
A = [int(x) for x in input().split()]

ntom = [0,2,5,5,4,5,6,3,7,6]

mtoa = {}
for a in sorted(A):
    mtoa[ntom[a]] = a

ms = sorted(mtoa.keys(), key=lambda x: mtoa[x], reverse=True)
dp = [0] + [float('-inf')] * N
for i in range(min(ms), N+1):
    dp[i] = max(dp[i-x] for x in ms if i >= x) + 1

ans = []
left = N
while left:
    for m in ms:
        if left >= m and dp[left] == dp[left - m] + 1:
            left -= m
            ans.append(mtoa[m])
            break
        
print(*ans, sep='')
k=int(input())
s=input()
n=len(s)
c=1
t=1
ans=0
for i in range(k+1):
  ans+=c*t
  ans%=mod
  c*=(n+k-i)*pow(i+1,mod-2,mod)
  c%=mod
  t*=25
  t%=mod
print(ans)


### FIXED CODE ###

mod=10**9+7
f=[1]
for i in range(2*10**6+7):f+=[f[-1]*(i+1)%mod]
def comb(a,b):return f[a]*pow(f[b],mod-2,mod)*pow(f[a-b],mod-2,mod)%mod
k=int(input())
s=input()
n=len(s)
ans=0
for i in range(k,-1,-1):
  ans+=comb(n+k,i)*pow(25,i,mod)
  ans%=mod
print(ans%mod)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

K = int(read())

x = np.arange(1, K + 1)
nums = np.gcd.outer(x, x, x)
print(nums.sum())


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

K = int(read())

x = np.arange(1, K + 1)
nums = np.gcd.outer(np.gcd.outer(x, x), x)
print(nums.sum())
import bisect
a,b,n = map(int,input().split())

x = list()
for i in range(n):
  y = int(a*(i+1)/b) - a*int((i+1)/b)
  x.insert(bisect.bisect_left(x,y))

print(x[-1])


### FIXED CODE ###

a,b,n=map(int,input().split())
x=min(b-1,n)
print((a*x)//b-a*(x//b))
a,p = map(int,input().split())
p = 3a + p
print(p//2)

### FIXED CODE ###

A, P = map(int, input().split())
K = A * 3
X = (K + P) // 2
print(X)
S = input()
Q = int(input())

reverse = False
cnt = 0
for i in range(Q):
    inp = input().split()
    if len(inp) == 1:
        cnt += 1
        reverse = (cnt % 2 != 0)
        #S = S[::-1]
    else:
        f, c = inp[1:]
        if int(f) == 1:
            if reverse:
                S = S + c
            else:
                S = c + S
        else:
            if reverse:
                S = c + S
            else:
                S = S + c
print(S[::-1] if reverse else S)

### FIXED CODE ###

S = input()
if "A" not in S or "B" not in S:
    print("No")
else:
    print("Yes")
N = int(input())
p_list = list(map(int,input().split()))

if sorted(p_list) == p_list:
    print("YES")
    sys.exit()

sum = 0
    
for i,j in zip(p_list,sorted(p_list)):
    if i != j:
        sum += 1

if sum == 2:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

import sys

N = int(input())
p_list = list(map(int,input().split()))

try:

    if sorted(p_list) == p_list:
        print("YES")
        sys.exit()

    sum = 0

    for i,j in zip(p_list,sorted(p_list)):
        if i != j:
            sum += 1

    if sum == 2:
        print("YES")
    else:
        print("NO")

except EOFError:
    pass
a,b,c,d=map(int,input().split())
print("Yes" if -c//b>=-a//d else "No")a,b,c,d=map(int,input().split())
print("Yes" if -c//b>=-a//d else "No")

### FIXED CODE ###

a,b,c,d=map(int,input().split())
for _ in range(100):
    a-=d
    c-=b
    if c<1:
        print("Yes")
        exit()
    if a<1:
        print("No")
        exit()
import itertools

def NextInts(): return map(int,input().split())

saisyo = input()
X = NextInts()
p = itertools.combinations(X, 2)
ANSWER = 0
for i in p:
	answer = int(i[0])*int(i[1])
	ANSWER+=answer
print(ANSWER%(10**9+7))


### FIXED CODE ###

def NextInts(): return map(int,input().split())

D,T,S = NextInts()

if (D/S>T)==True:
	print("No")
else :
	print("Yes")