标签: 欧拉定理

「NewCode 2019-3」 E. Big Integer

For little pupils, a very large number usually means an integer with many many digits. Let's define a class of big integers which consists only of the digit one (111)(11 \cdots 1). The first few integers in this class are 1,11,111,11111, 11, 111, 1111 \cdots. Denote A(n)A(n) as the nn-th smallest integer in this class. To make it even larger, we consider integers in the form of A(ab)A(a^b)
. Now, given a prime number pp , how many pairs (i,j)(i, j) are there such that 1 in, 1jm, A(ij)0(mod p)\leq i \leq n,\ 1 \leq j \leq m,\ A(i^j) \equiv 0(mod \ p)

「SDOI2010」 古代猪文

猪王国的文明源远流长,博大精深。

iPig在大肥猪学校图书馆中查阅资料,得知远古时期猪文文字总个数为N。当然,一种语言如果字数很多,字典也相应会很大。当时的猪王国国王考虑到如果修一本字典,规模有可能远远超过康熙字典,花费的猪力、物力将难以估量。故考虑再三没有进行这一项劳猪伤财之举。当然,猪王国的文字后来随着历史变迁逐渐进行了简化,去掉了一些不常用的字。