You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
int cnt = 0;
|
|
|
|
int m=n;
|
|
while (m) {
|
|
int a = m % 10;
|
|
m /= 10;
|
|
//个数增加1
|
|
cnt++;
|
|
}
|
|
printf("%d\n",cnt);
|
|
|
|
m=n;
|
|
while (m) {
|
|
int a = m % 10;
|
|
m /= 10;
|
|
printf("%d ", a);
|
|
}
|
|
return 0;
|
|
} |