time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNicholas, a painter is going to paint several new canvases. Nicholas is sure that the canvases will turn out so great that each one will need
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus has an array, consisting of n integers a1, a2, ..., an. Polycarpus likes it when numbers in an array match. That's why he wants the
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLenny is playing a game on a 3 × 3 grid of lights. In the beginning of the game all lights are switched on. Pressing any of the lights will toggle
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSquirrel Liss loves nuts. There are n trees (numbered 1 to n from west to east) along a street and there is a delicious nut on the top of each tree.
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the city of Ultima Thule job applicants are often offered an IQ test.The test is as follows: the person gets a piece of squared paper with a 4 ×
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cows playing poker at a table. For the current betting phase, each player's status is either "ALLIN", "IN", or "FOLDED", and does not
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Little Elephant loves chess very much.One day the Little Elephant and his friend decided to play chess. They've got the chess pieces but the
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSeveral ages ago Berland was a kingdom. The King of Berland adored math. That's why, when he first visited one of his many palaces, he first of all
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Berland Armed Forces System consists of n ranks that are numbered using natural numbers from 1 to n, where 1 is the lowest rank and n is the
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe problem describes the properties of a command line. The description somehow resembles the one you usually see in real operating systems.
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA dice is a cube, its faces contain distinct integers from 1 to 6 as black points. The sum of numbers at the opposite dice faces always equals 7.
B. T-primestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe know that prime numbers are positive integers that have exactly two distinct positive divisors. Similarly, we'll call a positive
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp thinks about the meaning of life very often. He does this constantly, even when typing in the editor. Every time he starts brooding he can
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSherlock Holmes and Dr. Watson played some game on a checkered board n × n in size. During the game they put numbers on the board's squares by some
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputShaass has decided to hunt some birds. There are n horizontal electricity wires aligned parallel to each other. Wires are numbered 1 to n from top
time limit per test10 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputIn the popular spreadsheets systems (for example, in Excel) the following numeration of columns is used. The first column has number A, the second —
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day, as Sherlock Holmes was tracking down one very important criminal, he found a wonderful painting on the wall. This wall could be
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA string is called a k-string if it can be represented as k concatenated copies of some string. For example, the string "aabaabaabaab" is at the
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya and Vasya are tossing a coin. Their friend Valera is appointed as a judge. The game is very simple. First Vasya tosses a coin x times, then
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOlga came to visit the twins Anna and Maria and saw that they have many cookies. The cookies are distributed into bags. As there are many cookies,