Codeforces|Leetcode|Codechef free solutions
Open in Telegram
Free codeforces, Codechef, Leetcode solutions are available 😍😍😍😍😍😍 Helped More than 200+ students to crack coding round in 2022 and helped placed them in Good companies. 🥳🥳🥳🤩🤩🤩 Dm @Cpsoln if you want help in coding round.
Show more4 317
Subscribers
No data24 hours
-137 days
-5230 days
Posts Archive
Repost from Codeforces|Leetcode|Codechef free solutions
Since your placement and intern session is coming 🤓🤓
So don't miss any opportunity in this recession😇😇😇😇
📌📌📌📌📌📌📌📌📌📌📌📌
No scam No fraud because we are not like other telegram channels.
If you want help in coding round of any company then Dm @Cpsoln and book your slot ✅✅✅✅
Repost from Codeforces|Leetcode|Codechef free solutions
GE DIGITAL TOMORROW EXAM SLOT AVAILABLE
DM @Cpsoln
Follow these steps to be a part of U Report India 🇮🇳
1⃣ Save the U-Report number: 9650414141 and then type and send *LIFEREF* to U-Report on *WhatsApp*
2⃣ After selecting the preferred language, enter details (age, gender and location).
3⃣ Type this *U-Reporter ID* :22420115
4⃣ Registration is complete.
📍You can get exciting prices and certificate through this campaign 🎁🎉
Will you have GE digital exam at 8 pm?
Repost from Codeforces|Leetcode|Codechef free solutions
Soon this id will become expert
Dm @Cpsoln Tu buy
Repost from Codeforces|Leetcode|Codechef free solutions
Since your placement and intern session is coming 🤓🤓
So don't miss any opportunity in this recession😇😇😇😇
📌📌📌📌📌📌📌📌📌📌📌📌
No scam No fraud because we are not like other telegram channels.
If you want help in coding round of any company then Dm @Cpsoln and book your slot ✅✅✅✅
#include <iostream>
#include <string>
using namespace std;
const int MOD = 1000000007;
void find_number_of_substrings() {
int n, k;
cin >> n >> k;
string s;
cin >> s;
int ans = 1;
int count = 0;
bool start = false;
int count2 = 0;
bool check = false;
for (int i = 0; i < n; i++) {
if (s[i] == 'a' s[i] == 'e' s[i] == 'i' s[i] == 'o' s[i] == 'u') {
if (!start) {
if (check) {
count2++;
ans = (ans * count2) % MOD;
}
}
count++;
start = true;
check = true;
count2 = 0;
} else {
if (!start) {
count2++;
}
}
if (count == k) {
start = false;
count = 0;
}
}
cout << ans << endl;
}
int main() {
int t;
cin >> t;
while (t > 0) {
find_number_of_substrings();
t--;
}
return 0;
}
