#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>
#include <map>
using namespace std;
const int maxn = 105;
int a[12];
int main(){
int n,t;
cin>>t;
while(t--){
cin>>n;
int d=0,c;
memset(a,0,sizeof(a));
for(int i=1;i<=n;i++){
int temp=i;
while(temp){
c=temp%10;
a[c]++;
temp/=10;
}
}
for(int i=0;i<=9;i++){
cout<<a[i]<<" ";
}
}
return 0;
}
Digit Counting UVA - 1225
最新推荐文章于 2021-03-18 22:35:39 发布