Advertisement
a53

ndivnlen

a53
Feb 16th, 2022
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define ULL unsigned long long int
  3. using namespace std;
  4.  
  5. int nrc(int n) /// NIntoarce numarul de cifre ale lui n
  6. {
  7. int nr=0;
  8. while(n)
  9. ++nr,n/=10;
  10. return nr;
  11. }
  12.  
  13. int main()
  14. {
  15. int n;
  16. cin>>n;
  17. int c=nrc(n);
  18. cout<<n;
  19. for(int i=1;i<=n-c;++i)
  20. cout<<0;
  21. cout<<'\n';
  22. return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement