fork download
  1. #include<stdio.h>
  2. #include<bits/stdc++.h>
  3. #include<string.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. char s[1001],i;
  9. int f,j;
  10. cin>>s;
  11. for(i=48;i<58;i++){
  12. f=0;
  13. for(j=0;j<strlen(s);j++)
  14. {
  15. if(s[j]==i)
  16. {
  17. f++;
  18. }
  19. }
  20. cout<<f<<" ";
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0s 5412KB
stdin
a11472o5t6
stdout
0 2 1 0 1 1 1 1 0 0