Skip to main content

library_mult

Consider a string containing lowercase characters from the Portuguese alphabet. You can perform two types of operations on this string:

Concat a lowercase character from the Portuguese alphabet at the end of the string.

Remove the last character from the string. If the string is empty, it will remain empty.

Given an integer k and two strings s and t, determine if you can convert s to t using exactly k operations described above on s. If possible, the program prints 'yes', otherwise it prints 'no'.

For example, string s = [a, b, c] and string t = [d, e, f]. The number of moves k = 6. To convert s to t, we first remove all characters using 3 moves. Then we concatenate each of the characters of t in the order. In the sixth move, you will have the expected string s. If more movements are available than necessary, they can be eliminated by performing multiple removals on an empty string. If there are fewer movements, it would not be possible to create the new string.

Input format The first line contains the string s, the starting string. The second line contains the string t, the desired string. The third line contains an integer k, the number of operations.

Constrains a) 1 <= | s | <= 100 b) 1 <= | t | <= 100 c) 1 <= k <= 100 d) s and t consists of lowercase letters of the Portuguese alphabet, ascii [a-z]

Output format Print 'yes' if you can get the string t by executing exactly k operations on the string s, and print 'no' otherwise.

Example 1 bla bla bla bla blablabcde 8 yes

Explanation It took 5 operations to reduce the string "blablablabla" to "blablab". Then, 3 concatenation operations (c, d, e) were needed to obtain the string "blablabcde". In this way, as it was possible to convert s to t using exactly k = 8 operations, the program printed "yes".

Metadata

Release files for concat-remove-library 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for concat-remove-library 0.1.0
File Size Uploaded Provenance
concat_remove_library-0.1.0.tar.gz 3.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for concat-remove-library 0.1.0
File Interpreter ABI Platform
concat_remove_library-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / concat_remove_library-0.1.0.tar.gz

Download URL concat_remove_library-0.1.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a954d30e69b60e8f9d3a7026b2aa5aaa61b95493fdcf3730aeb0e371d8956ff8
BLAKE2b-256 checksum
How to use checksums
0a050e7affde39be9aba0c842fb6bdce0f9f9f6d1a2092ab7723212d9b43f5b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.10

Release files / concat_remove_library-0.1.0-py3-none-any.whl

Download URL concat_remove_library-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e183b19820a112c93eabb868d836c9eaa4b32e36ef748450cec3bd141154bc3
BLAKE2b-256 checksum
How to use checksums
879277ae3dac650485142675685b4c469bbdc2bb38d034646a96826724f6c09e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.10

Security for concat-remove-library 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page