1009. K-based Numbers Time limit: 0.5 second Memory limit: 64 MB Let’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’
传送门:【HDU】3652 B-number 题目分析:记录数字对13取模后的状态。 代码如下: #include <cstdio>#include <cstring>#include <algorithm>using namespace std ;typedef long long LL ;#define rep( i , a , b ) for ( int i
传送门:【BZOJ】1026: [SCOI2009]windy数 题目分析:数位DP水题。 代码如下: #include <stdio.h>#include <cstring>#include <algorithm>#define rep( i , a , b ) for ( int i = a ; i < b ; ++ i )#define For( i ,
对应POJ题目:点击打开链接 Round Numbers Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3252 Description The cows, as you know, have no f
吉哥系列故事——恨7不成妻 Time Limit: 1000/500 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2260 Accepted Submission(s): 660 Problem Description 单身! 依然单
http://www.lightoj.com/volume_showproblem.php?problem=1068 求出区间[A,B]内能被K整除且各位数字之和也能被K整除的数的个数。(1 ≤ A ≤ B < 231 and 0 < K < 10000) 算是最简单的数位dp了,k在这里是10000,三维数组都开不开。但是想想会发现A,B最多有10位,各位数字之和不会超过90,那么当