逆元
囧九
大学萌新
展开
-
A - 费马小定理
求:3^0 + 3^1 +...+ 3^(N) mod 1000000007 Input 输入一个数N(0 <= N <= 10^9) Output 输出:计算结果 Sample Input 3 Sample Output 40 #include<bits/stdc++.h> using namespace std; #define c 100000...原创 2018-07-27 14:22:56 · 137 阅读 · 0 评论 -
C - Kyoya and Colored Balls CodeForces - 554C
费马小定理 + 组合数 第i种颜色的最后一个数 的后一个必须是第i+1种颜色 Kyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are labeled from 1 to k. Balls of the same color are indisting...原创 2018-07-31 15:19:19 · 131 阅读 · 0 评论 -
A - Will he Die? Gym - 101778A
Unfortunately, Conan is in a real danger! Conan discovered who is the killer after searching for the evidence in a dangerous cave. Now, he is standing in front of a bomb that about to explode. The bom...原创 2018-09-05 16:52:08 · 221 阅读 · 0 评论