Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. static long mystery(int n) {
  2. if (n==0)
  3. return 1;
  4. long temp = mystery(n/2);
  5. if (n%2==0)
  6. return temp*temp;
  7. else
  8. return 2*temp*temp;
  9. } `
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement