好吧,快速幂

来源:互联网 发布:初中生在哪学编程 编辑:程序博客网 时间:2024/06/17 03:21
#include<iostream>using namespace std;int po_w(int x,int y){    int r = 1,base = x;    while(y)    {        if(b & 1) r *= base;        base *= base;        b >>= 1;    }    return r;}
原创粉丝点击