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;
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
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, .
Poor Akagi Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 131 Accepted Submission(s): 29 Problem Description Akagi is not only good at basketball but also good at math. Recently, he got a
Reading comprehension Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1270 Accepted Submission(s): 512 Problem Description Read the program below carefully then answer the question.#pragma co