3 条题解
-
-2陈烨鑫 (chenyexin) LV 10 @ 2023-4-23 20:48:48
/***************************************** 备注:数学nanhai 5 ******************************************/ #include <queue> #include <math.h> #include <stack> #include <stdio.h> #include <iostream> #include <vector> #include <iomanip> #include <string.h> #include <algorithm> using namespace std; #define LL long long const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; LL power(LL n , LL m , LL p) { if(n == 0) return 0; LL ans = 1; while(m) { if(m&1) ans = (ans * n) %p; m >>= 1; n = (n*n)%p; } return ans%p; } int main() { LL n , m , p; cin >> n >> m >> p; cout << power(n , m , p); return 0; }
-
-52023-5-29 17:45:56@
1+1=2 a的b次方 是a×b次a
-
-72023-5-7 19:38:36@
#include<bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; cout << a + b << endl; return 0; }
- 1
信息
- ID
- 2
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 8
- 标签
- 递交数
- 2711
- 已通过
- 430
- 上传者