摘要: 这题的算法不算复杂,依次考虑每个数字在个位,十位等等 的出现次数累加即可,但是相当的复杂阿。。。。。。#include<iostream>#include<cstdio>#include<cstring>using namespace std;void count(int n,int a[]){ int t=1; int ten,p=0,k=n; while(n>=10) { ten=n/10,p=n%10; if(t>=10) a[0]+=(ten-1)*t; else a[0]+=ten*t; ... 阅读全文
posted @ 2012-04-24 09:04 fakeAcmer 阅读(386) 评论(0) 推荐(0) 编辑