摘要:
The round carousel consists of nn figures of animals. Figures are numbered from 11 to nn in order of the carousel moving. Thus, after the nn -th figur 阅读全文
摘要:
A number is ternary if it contains only digits 00 , 11 and 22 . For example, the following numbers are ternary: 10221022 , 1111 , 2121 , 20022002 . Yo 阅读全文
摘要:
For the given integer nn (n>2n>2 ) let's write down all the strings of length nn which contain n−2n−2 letters 'a' and two letters 'b' in lexicographic 阅读全文
摘要:
You are given two positive integers aa and bb. In one move you can increase aa by 11 (replace aa with a+1a+1). Your task is to find the minimum number 阅读全文