Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- using namespace std;
- int main()
- {
- long long n,x=1;
- cin>>n;
- for (int i=1;i<=n;i++){
- x*=2;
- x%=10000;
- }
- if (x>1000){
- x%=1000;
- cout.fill('0');
- cout<<setw(3)<<x;
- }
- else {
- cout<<x;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement