c[k++] = tmp;
from = i+1;
}
from = i+1;
continue;
}
else {
int tmp = div1(from, i);
c[k++] = tmp;
}
}
}
qsort(c, k, sizeof(c[0]), cmp_int );
if(k >= 2) {
for(int j = 0; j <= k-2; j++) {
cout << c[j] << ' ';
}
cout << c[k-1];
cout << endl;
}
else {
cout << c[0] << endl;
}
}
void init() {
while(scanf("%s", str)!= EOF) {
int len = strlen(str);
bool first = true;///代表是第一个出现的5。
index = 0;
for(int i = len-1; i >= 0; i--) {
if(str[i]!='5'){
first = true;
b[index++] = str[i]-'0';
continue;
}
if(str[i]=='5'&&first&&i!=len-1) {///连续的5仅仅存一个,最前,最后都没5.
first = false;
b[index++] = str[i]-'0';
continue;
}
if((str[i]=='5'&&i==len-1)||(!first&&i!=len-1)) {
continue;
}
}
///finish change;
work();
}
}
int main(){
init();///先处理一下,去掉重复的5;
return 0;
}
/****************
测试数据:
550775599
4050070567 //前导零。
44566655
0051231232050775
********************/