数学
共 9 篇文章
acwing3491. 完全平方数
暂无摘要...
acwing2068. 整数拼接
暂无摘要...
acwing523. 组合数问题
暂无摘要...
acwing1205. 买不到的数目
暂无摘要...
leetcode204. 计数质数
暂无摘要...
leetcode66. 加一
分析从最后一位开始+1后%10,若得到的值不为0,则说明不需要进位了,直接返回。若到第一位还是需要进位,则首位需要再向前+1。(9999)->(10000)class Solution {public: vector<int> plusOne(vector<int>
leetcode50. Pow(x, n)
分析使用快速幂做法class Solution {public: double myPow(double x, int n) { double ans=1.0; if(x==0)return 0.0; long b=n; if(b<
acwing875. 快速幂
暂无摘要...
acwing801. 二进制中1的个数
#include<iostream>using namespace std;int n;int main(){ cin>>n; int x; while(n--){ cin>>x; int res=0;