一品网
  • 首页

326.3的幂


class Solution {
public:
    bool ifPowerofN(int n,int num){
        while (n%num==0){
            n/=num;
        }
        return n==1;
    } 
    bool isPowerOfThree(int n) {
        if (n==0) return false;
        return ifPowerofN(n,3);
    }
};

  修改3的数值 可以用来测试不同的幂

简单

相关


python-----面向对象简单理解

.NetCore简单封装基于IHttpClientFactory的HttpClient请求

腾讯云服务器简单配置web项目

vue axios 1 创建项目及简单配置axios

nodejs 一个简单的web服务器,用于前端自己快速测试部署

1.搭建简单的springBoot项目

git 简单操作教程

一个简单的IM聊天程序Pie IM(以后会更新)

简单 Python 快乐之旅之:Python 基础语法之输入输出操作专题

SpringBoot之简单入门

Django 的简单ajax

python中pdf文件解析包pdfplumber的简单使用

标签

一品网 冀ICP备14022925号-6