Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
109848 吴亦洵 快速幂运算 C++ 通过 100 0 MS 240 KB 180 2023-11-11 11:15:14

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int main(){ int x,n,ans=1; cin>>x>>n; while(n){ if(n&1){ ans*=x; } x*=x; n>>=1; } cout<<ans; return 0; }


测评信息: