Sumdiv Sumdiv Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 15364 Accepted: 3790 Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of…
http://acm.hit.edu.cn/hoj/problem/view?id=3152 Dice My Tags (Edit) Source : Time limit : sec Memory limit : M Submitted : , Accepted : You have a dice with M faces, each face contains a distinct number. Your task is to calculate the expected number o…
题目链接:https://ac.nowcoder.com/acm/contest/903/B 题意: 给你 q,n,p,求 q1+q2+...+qn 的和 模 p. 思路:一开始不会做,后面查了下发现有个等比数列求和的快速幂公式,附上链接https://www.cnblogs.com/yuiffy/p/3809176.html AC代码: #include<cstdio> #include<iostream> using namespace std; long long mod;…
Power of Fibonacci Time Limit: 5 Seconds Memory Limit: 65536 KB In mathematics, Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers of the following integer sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, .…