Skip to content

Jammy got the prescription of medicine. Every medicine is k characters long, But on the preseniption the medicine names are written as single string...............[See readme file]

Notifications You must be signed in to change notification settings

atul-harsh33108/Jammy-got-the-prescription-of-medicine.-python-code-Asked-in-Lpu-s-ETP-Qt4-2022-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Jammy-got-the-prescription-of-medicine.-python-code-Asked-in-Lpu-s-ETP-Qt4-2022-

Jammy got the prescription of medicine. Every medicine is k characters long, But on the preseniption the medicine names are written as single string...............[See readme file]

Full Question:- Jammy got the prescription of medicine. Every medicine is k characters long, But on the preseniption the medicine names are written as single string. Take this single string of medicine names and value k as input from the user, and divide the string into subparts to retain the individual medicine names in the following way:

  • The total number of subparts representing individual medicine names are the division of length of string and k i len(string) / k and (length of string > k),

  • Remove the occurrence of character which is more than one, from each subpart

  • The character in each subpart is in the same sequence as in the original medicine name.

Note: If len(string)%k is not equal to 0 then print “Invalid”

Constraint:

1 <= k < length of the input string.

About

Jammy got the prescription of medicine. Every medicine is k characters long, But on the preseniption the medicine names are written as single string...............[See readme file]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages