Tap here to switch tabs
Problem
Submissions

Problem: Count Strings Rearrangeable to Contain a Substring

Count Strings Rearrangeable to Contain a Substring asks how many lowercase strings of length n can be rearranged to make “leet” a contiguous substring, with the result modulo a prime.

Statement

Given an integer n, return the total number of strings of length n consisting only of lowercase English letters that can be rearranged to contain "leet" as a substring.

Since the result may be very large, return it modulo 109+710^9 + 7.

Note: A substring is a contiguous non empty sequence of characters within a string.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Strings Rearrangeable to Contain a Substring

Count Strings Rearrangeable to Contain a Substring asks how many lowercase strings of length n can be rearranged to make “leet” a contiguous substring, with the result modulo a prime.

Statement

Given an integer n, return the total number of strings of length n consisting only of lowercase English letters that can be rearranged to contain "leet" as a substring.

Since the result may be very large, return it modulo 109+710^9 + 7.

Note: A substring is a contiguous non empty sequence of characters within a string.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5