Created
April 4, 2016 02:22
-
-
Save peace098beat/94264bfa61cd32b92f537a301faf9ee2 to your computer and use it in GitHub Desktop.
累乗計算
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ** 累乗計算 | |
| def ruijou(self, x): | |
| from numpy import log2, floor | |
| y0 = log2(x) | |
| # 最小t | |
| p = floor(y0) | |
| return int(2 ** p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment