摘要: 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 figure 阅读全文
posted @ 2020-03-27 00:50 Vetsama 阅读(412) 评论(0) 推荐(0)
摘要: A number is ternary if it contains only digits 00, 11 and 22. For example, the following numbers are ternary: 10221022, 1111, 2121, 20022002. You are 阅读全文
posted @ 2020-03-27 00:46 Vetsama 阅读(355) 评论(0) 推荐(0)
摘要: 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 lexicographica 阅读全文
posted @ 2020-03-27 00:44 Vetsama 阅读(516) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-03-27 00:40 Vetsama 阅读(223) 评论(0) 推荐(0)