#include<iostream>
using namespace std;
void f(int a,int i){
int b=a%10;
a/=10;
if(a>0)f(a,i-1);
else if(i)while(i>1){cout<<"0";--i;}
cout<<b;
}
int main(){
int a = 0; //怎么用cout 把它输出成 0000
f(a,4);
cout<<endl;
a = 1;
//输出
0001
f(a,4);
cout<<endl;
a = 20; //输出
0020
f(a,4);
cout<<endl;
a =123; //输出 0 123