0
点赞
收藏
分享

微信扫一扫

【新手上路】LeetCode刷题之“4的幂”

大漠雪关山月 2022-03-18 阅读 76

#include <math.h>
bool isPowerOfFour(int n){
    int i=0;
    while(pow(4,i)<n) i++;
    if(pow(4,i)==n) return true;
    else return false;
}

 

 

举报

相关推荐

0 条评论