Question: 2 You are given an integer N . A string consisting of the lowercase English alphabet is called valld ifand only if each vowel occurs
You are given an integer A string consisting of the lowercase English alphabet is called valld ifand only if each vowel occurs at most once in the string.
Each vowel is assigned a score which is given by a score array of size where,
score refers to the score of a
score refers to the score of
score refers to the score of
score refers to the score of
score refers to the score of
The FUN of a string is defined as the sum of the product of the score of two consecutive vowels and their distance.
Your task is to find the sum of FUN of all possible valid strings of length and return the ans modulo
Input Format
The first line contains denoting the number of test cases. also Specifies the number of times you have to run the countThemAI function on a different set of inputs.
For each test case:
The first line contains denoting the length of the string.
The second line contains spaceseparated values denoting the scores of the vowels.
Output Format
For each test case, print the total FUN modulo in a new line.
imple Testcase #
estcase Input
Copy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
