数学
Zhangcan233
这个作者很懒,什么都没留下…
展开
-
阶乘除法
题目链接:阶乘除法 题目:Description输入两个正整数 n, m,输出n!/m!,其中阶乘定义为n!= 1*2*3*...*n (n>=1)。 比如,若n=6, m=3,则n!/m!=6!/3!=720/6=120。是不是很简单?现在让我们把问题反过来:输入 k=n!/m!,找到这样的整数二元组(n,m) (n>m>=1)。原创 2017-07-07 23:29:52 · 4031 阅读 · 0 评论 -
ZCMU1901-LOGO
题目链接:LOGO题目:Problem E: LogoLogo is a programming language built around a turtle. Commands in the language cause the turtle to move. The turtle has a pen attached to it. As the turtle moves, it原创 2017-07-13 18:35:41 · 343 阅读 · 0 评论 -
CSU-ACM2017暑假集训比赛2 HDU - 1597 find the nth digit
题目:Problem Description假设:S1 = 1S2 = 12S3 = 123S4 = 1234.........S9 = 123456789S10 = 1234567891S11 = 12345678912............S18 = 123456789123456789..................现在我们把原创 2017-08-03 20:46:01 · 362 阅读 · 0 评论 -
fzu-Wand
题目:N wizards are attending a meeting. Everyone has his own magic wand. N magic wands was put in a line, numbered from 1 to n(Wand_i owned by wizard_i). After the meeting, n wizards will take a wand one原创 2017-08-24 17:59:27 · 311 阅读 · 0 评论 -
求区间[1,N]的质数的个数(1≤N≤10^11)
网上看到的黑科技。。。不知道是啥算法,先记个板子#include<bits/stdc++.h>#define ll long long using namespace std; ll f[340000],g[340000],n; void init(){ ll i,j,m; for(m=1;m*m<=n;++m) f[m]=n/m-1;原创 2017-09-08 19:30:42 · 858 阅读 · 0 评论