~~~~~~~数学题~~~~~~
yphacker
心之所动,且就随缘去吧
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU5105 Math Problem(数学题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5105 解题思路:BestCoder官方题解:原创 2014-11-16 16:39:23 · 623 阅读 · 0 评论 -
LightOj 1214 Large Division(大数除法)
Large DivisionInputInput starts with an integer T (≤ 525), denoting the number of test cases.Each case starts with a line containing two integers a (-10200 ≤ a ≤ 10200) and b (|b| > 0, b f原创 2016-03-17 11:34:25 · 380 阅读 · 0 评论 -
LightOj 1234 Harmonic Number
Harmonic NumberDescriptionIn mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers:In this problem, you are given n, you have to find Hn.原创 2016-03-17 10:41:40 · 422 阅读 · 0 评论 -
LightOJ 1282 Leading and Trailing(n阶的前三位,后三位)
Leading and Trailing解题思路:求最后的三位,可以通过直接取余得到;求前三位则需要一些数学知识对于给定的一个数n,它可以写成10^a,其中这个a为浮点数,则n^k=(10^a)^k=10^a*k=(10^x)*(10^y);其中x,y分别是a*k的整数部分和小数部分,对于t=n^k这个数,它的位数由(10^x)决定,它的位数上的值则有(10^y)决定,因此我们要求t的前三原创 2016-02-19 13:24:15 · 355 阅读 · 0 评论 -
LightOJ 1245 Harmonic Number (II)
Harmonic Number (II)解题思路:(1)直接暴力。(2)找规律。1.n = 10 sqrt(10) = 3 10/sqrt(10) = 3i 1 2 3 4 5 6 7 8 9 10n/i 10 5 3 2 2 1 1 1 1原创 2016-02-25 21:21:19 · 527 阅读 · 0 评论 -
LightOj 1336 Sigma Function(打表找规律)
Sigma FunctionDescriptionSigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a原创 2016-03-17 10:29:16 · 411 阅读 · 0 评论 -
hdu 1029 Ignatius and the Princess IV
Ignatius and the Princess IV题目链接:解题思路:AC代码:#include using namespace std;int main(){ int n; while(~scanf("%d",&n)){ int x,ans,cnt = 0; while(n--){原创 2016-03-16 22:39:44 · 301 阅读 · 0 评论 -
HDU5109 Alexandra and A*B Problem(数学题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5109解题思路:BestCoder官方题解:原创 2014-11-24 11:25:07 · 799 阅读 · 0 评论 -
Codeforces 488 B. Candy Boxes(构造)
题目链接: 解题思路:BestCoder官方题解:原创 2014-11-23 20:11:30 · 639 阅读 · 0 评论 -
HDU5100 Chessboard(数学题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5100解题思路:BestCoder官方题解:原创 2014-11-16 17:54:08 · 643 阅读 · 0 评论 -
LightOj 1006 Hex-a-bonacci(矩阵快速幂)
Hex-a-bonacciDescriptionGiven a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows:int a, b, c, d, e, f;int fn( in原创 2016-03-24 11:08:01 · 461 阅读 · 0 评论
分享