All Tracks Algorithms String Algorithms Problem

stringer
Tag(s):

Very-Easy

Problem
Editorial
Analytics

Papag has a given a string and he is not able to solve the problem given by his child so help papag in solving the problem.
find the frequency of digits (0-9) in a string and print the frequency in a single line separated by space.

Input:
2
1214545
54658455454

Output:
0 2 1 0 2 2 0 0 0 0
0 0 0 0 4 5 1 0 1 0

Problem Setter : Avinash Gurjar

SAMPLE INPUT
2
1214545
54658455454
SAMPLE OUTPUT
0 2 1 0 2 2 0 0 0 0 
0 0 0 0 4 5 1 0 1 0
Time Limit: 10.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Visual Basic, Kotlin

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

Notifications
View All Notifications