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