#include <stdio.h> int main() { int m,n; while(scanf("%d %d",&m,&n)!=EOF) { int a[10]={0}; for(int i=m;i<=n;++i) { int temp=i; while(temp!=0) { int num=temp%10; a[num]++; temp/=10; } } for(int i=0;i<10;++i) { printf("%d",a[i]); if(i<9) printf(" "); } printf("\n"); } } |
Double click to view unformatted code.