Cerinta completa Lily likes to play games with integers. She has created a new game where she determines the difference between a number and its reverse. For instance, given the number , its reverse is . Their difference is .
Beautiful Binary String
Cerinta completa Alice has a binary string. She thinks a binary string is beautiful if and only if it doesn’t contain the substring . In one step, Alice can change a to a or vice versa. Count and print the
Beautiful 3 Set
Cerinta completa You are given an integer . A set, , of triples is beautiful if and only if: Let be the set of different ‘s in , be the set of different ‘s in , and be the set
Bear and Steady Gene
Cerinta completa A gene is represented as a string of length (where is divisible by ), composed of the letters , , , and . It is considered to be steady if each of the four letters occurs exactly times.
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
