摘要:
Unlucky year in Berland is such a year that its number n can be represented as n = xa + yb, where a and b are non-negative integer numbers. For exampl 阅读全文
摘要:
Pasha is participating in a contest on one well-known website. This time he wants to win the contest and will do anything to get to the first place! T 阅读全文
摘要:
You are given an integer sequence 1,2,…,n1,2,…,n. You have to divide it into two sets AAand BB in such a way that each element belongs to exactly one 阅读全文
摘要:
You are given a string ss consisting of exactly nn characters, and each character is either '0', '1' or '2'. Such strings are called ternary strings. 阅读全文