HBC51467DirectionSetting,图论,网络流Big Integer题解

一天到晚红烧的鱼 算法基础篇 84 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
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 . The first few integers in this class are 1,11,111,11111, 11, 111, 1111 cdots1,11,111,1111. Denote A AAas the n nn-th smallest integer in this class. To make it even larger, we consider integers in the form of AA(a^b)A. Now, given a prime number p pp, how many pairs (i,j) (i,j)are there such that 1≤i≤n,1≤j≤m,A≡01 leq i leq n, 1 leq j leq m, A(i^j) equiv 01≤i≤n,1≤j≤m,A≡0.

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 (11⋯1)(11 cdots 1)(11⋯1). The first few integers in this class are 1,11,111,1111⋯1, 11, 111, 1111 cdots1,11,111,1111⋯. Denote  A(n) A(n) A(n) as the  n n n-th smallest integer in this class. To make it even larger, we consider integers in the form of A(ab)A(a^b)A(ab). Now, given a prime number  p p p, how many pairs  (i,j) (i, j) (i,j) are there such that 1≤i≤n, 1≤j≤m, A(ij)≡0(mod p)1 leq i leq n, 1 leq j leq m, A(i^j) equiv 0(mod p)1≤i≤n, 1≤j≤m, A(ij)≡0(mod p).

HBC51467DirectionSetting,图论,网络流Big Integer题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC51467DirectionSetting 图论 网络流Big Integer题解