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