326. 3的幂

1 class Solution 
2 {
3 public:
4     bool isPowerOfThree(int n) 
5     {
6         return n > 0 && 1162261467 % n == 0;
7     }
8 };

 

posted @ 2020-04-21 17:25  Jinxiaobo0509  阅读(78)  评论(0)    收藏  举报