Loading

摘要: 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 阅读全文
posted @ 2020-03-27 23:56 脂环 阅读(193) 评论(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 . Yo 阅读全文
posted @ 2020-03-27 08:45 脂环 阅读(201) 评论(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 lexicographic 阅读全文
posted @ 2020-03-27 08:33 脂环 阅读(236) 评论(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 08:28 脂环 阅读(196) 评论(0) 推荐(0) 编辑