Skip to content

RVP04/Alphabet-Count-Repeated-String-Skillrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Alphabet-Count-Repeated-String-Skillrack

A string S is passed as input to the program. The string S is repeated till the repeated string R is of length N. The program must print the count of a specific alphabet A which is passed as the input in the repeated string R.

Input Format:
The first line contains S.
The second line contains N.
The third line contains A.

Output Format:
The first line contains the count of the alphabet A in the repeated string R.

Boundary Conditions:
1 <= Length of S <= 50
1 <= N <= 9999999
A is from a to z

Example Input/Output 1:
Input:
abcd
10
b

Output:
3

Explanation:
abcd when repeated till length 10 is abcdabcdab in which the alphabet b occurs 3 times.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages