Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. long long n,x=1;
  9. cin>>n;
  10. for (int i=1;i<=n;i++){
  11. x*=2;
  12. x%=10000;
  13. }
  14. if (x>1000){
  15. x%=1000;
  16. cout.fill('0');
  17. cout<<setw(3)<<x;
  18. }
  19. else {
  20. cout<<x;
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement