[字符串]
摘要:
题目:给出一个整数n,问1-n之间包括n在内的所有数中49出现的次数。输入首先为一个整数T,表示接下来有T组输入。# include <cstdio># include <cstring># define N 10000000# define LEN 22typedef long long int LL;LL f[LEN][10];LL pow10[LEN];void init(void){ pow10[0] = 1; for (int i = 1; i < LEN; ++i) { pow10[i] = 10*pow10[i-1]; if (i>=... 阅读全文
posted @ 2012-08-01 23:44 getgoing 阅读(151) 评论(0) 推荐(0) 编辑