Advertisement
Guest User

Untitled

a guest
Dec 20th, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. #include <math.h>
  4. int main()
  5. {
  6. long long int a,b;
  7. while(cin>>a>>b)
  8. {
  9. a%=10007;
  10. long long int ans = pow((long double)a,(long double)b);
  11. cout<<(ans%10007)<<endl;
  12. }
  13.  
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement