Bead Ornaments

Cerinta completa There are colors of beads. You have beads of the color. You want to make an ornament by joining all the beads together. You create the ornament by using the following algorithm: Step # Arrange all the beads

Ashton and String

Cerinta completa Ashton appeared for a job interview and is asked the following question. Arrange all the distinct substrings of a given string in lexicographical order and concatenate them. Print the character of the concatenated string. It is assured that

Array Construction

Cerinta completa Professor GukiZ has hobby — constructing different arrays. His best student, Nenad, gave him the following task that he just can’t manage to solve: Construct an -element array, , where the sum of all elements is equal to

Arithmetic Expressions

Cerinta completa 5-year-old Shinchan had just started learning mathematics. Meanwhile, one of his studious classmates, Kazama, had already written a basic calculator which supports only three operations on integers: multiplication , addition , and subtraction . Since he had just

Apple and Orange

Cerinta completa Sam’s house has an apple tree and an orange tree that yield an abundance of fruit. Using the information given below, determine the number of apples and oranges that land on Sam’s house. In the diagram below: The

Append and Delete

Cerinta completa You have two strings of lowercase English letters. You can perform two types of operations on the first string: Append a lowercase English letter to the end of the string. Delete the last character of the string. Performing