If we sum up every digit of a number and the result can be exactly divided by 10, we say this number is a good number. You are required to count the number of good numbers in the range from A to B, inclusive. InputThe first line has a number T (T <=…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3555 Problem Description The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the curre…
#include <bits/stdc++.h> typedef long long LL; const int MOD = (int)1e9 + 7; LL L,R,G,T; int dp[62 + 1][2][2][2][2]; bool vis[62 + 1][2][2][2][2]; inline void add(int &a,int b) { a += b; if (a >= MOD) a -= MOD; if (a < 0) a += MOD; } int c…
#include<bits/stdc++.h>using namespace std;int num[20];//按位储存数字int mod;long long dp[20][110][110];//位数,位数和,位数和对mod取模的余数 long long dfs(int pos,int he,int yushu,int limit)//通常用三个以上变量dfs,分别用来表示状态,前导零,数字上限,这道题没有前导零,分别表示//数字的位数,前面位数和,对于mod的余数{ if(pos=…