摘要: 果然是练思维呀!!要是我的话估计就能挨个算一算呜呜呜 分解成 2和5相乘的式子 1 #include <iostream> 2 using namespace std; 3 //快速幂运算 4 5 int main(){ 6 int data[100]={}; 7 int num2=0; 8 int 阅读全文
posted @ 2020-07-06 21:59 安之若醇 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1 int gcd(long a,long b){//条件a>b 2 if(b==0)return a; 3 return gcd(b,a%b); 4 } 阅读全文
posted @ 2020-07-06 21:39 安之若醇 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1 //快速幂运算 2 long power_n(int n,int b){//n^b 3 long res=1;//注意是等于1 4 while(b>0){ 5 if(b&1)//取幂数的最后一位 6 res*=n; 7 b>>=1;//右移一位 8 n=n*n;//加权 9 10 } 11 re 阅读全文
posted @ 2020-07-06 21:37 安之若醇 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <algorithm> 3 4 using namespace std; 5 int a[100]; 6 int binarysearch(int a[],int size,int att){ 7 sort(a,a+size);//一 阅读全文
posted @ 2020-07-06 18:45 安之若醇 阅读(231) 评论(0) 推荐(0) 编辑
摘要: ....又是以前虐过我的期末习题..哪里摔倒就哪里爬起来吧 1 #include<iostream> 2 #include<math.h> 3 #define N 1e-3 4 using namespace std; 5 6 bool IsZero(double a){ 7 return abs( 阅读全文
posted @ 2020-07-06 18:19 安之若醇 阅读(259) 评论(0) 推荐(0) 编辑
Live2D服务支持