Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,sc=0,nc=0,x=0,f=1;
- cin>>n;
- if(n==0) nc=1;
- while(n)
- x=x*10+1,++nc,f=f*nc,sc=sc+n%10,n=n/10;
- f=f/nc;
- cout<<1LL*f*x*sc;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement