![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
invoKer-
这个作者很懒,什么都没留下…
展开
-
CodeForces - 17D Notepad【欧拉降幂】
题目链接:https://codeforces.com/contest/17/problem/D (b−1)bn−1%p(b-1)b^{n-1} \%p(b−1)bn−1%p #include <iostream> #include <cstdio> #include <cstring> using namespace std; static const int MAXN=1e6+10; char b[MAXN],n[MAXN]; int p; int power(int原创 2020-10-06 17:58:31 · 177 阅读 · 0 评论 -
CodeForces - 17A Noldbach problem【素数筛】【水题】
题目链接:https://codeforces.com/contest/17/problem/A 数据范围小,也可以暴力 #include <iostream> #include <cmath> using namespace std; static const int MAXN=1e3+10; int n,k; int cnt,prime[MAXN]; bool vis[MAXN]; void get_prime(int n) { for(int i=2;i<=n;i原创 2020-10-05 20:52:09 · 260 阅读 · 0 评论 -
CodeForces - 10C Digital Root【数论】
【题目描述】 Not long ago Billy came across such a problem, where there were given three natural numbers A, B and C from the range [1, N], and it was asked to check whether the equation AB = C is correct. R...原创 2020-03-17 19:15:58 · 186 阅读 · 0 评论