-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1352A.c
More file actions
36 lines (33 loc) · 709 Bytes
/
Copy path1352A.c
File metadata and controls
36 lines (33 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<stdio.h>
#include<string.h>
int main(){
int t;
char s[10];
scanf("%d",&t);
for(int i=0;i<t;i++){
scanf("%s",&s);
int l=strlen(s);
char s2[l+1];
for(int j=0;j<l;j++){
s2[j]=s[l-1-j];
}
int count=0;
for(int j=0;j<l;j++){
if(s2[j]!='0'){
count++;
}
}
printf("%d\n",count);
for(int j=0;j<l;j++){
if(s2[j]=='0'){
continue;
}
printf("%c",s2[j]);
for(int k=0;k<j;k++){
printf("0");
}
printf(" ");
}
printf("\n");
}
}