PaiGuDragon is an excellent number theory player. For apositive interger number xxx, if the digit sum of xxx is a prime number, the PaiGuDragon calls xxx nice number.(i.e. digit sum of 269 equals to 17, and 17 is a prime number so 269 is nice!) PaiGuDragon is curious about what is the nnn th smallest nice number.
PaiGuDragon is an excellent number theory player. For a positive interger number xxx, if the digit sum of xxx is a prime number, the PaiGuDragon calls xxx nice number.(i.e. digit sum of 269 equals to 17, and 17 is a prime number so 269 is nice!) PaiGuDragon is curious about what is the nnn th smallest nice number.
标签: HBC237152牛妹的苹果树 最近公共祖先(LCA) 图论 动态规划 树形dpThis is a number theory problem题解