
简单数学
AC__GO
程序猿
展开
-
Eratosthenes筛法(埃氏筛法)
埃氏筛法原创 2017-10-26 09:29:55 · 905 阅读 · 0 评论 -
hdu1215 七夕节
因数和优化原创 2017-11-09 17:40:06 · 2978 阅读 · 0 评论 -
ACM——错排(hdu1465)
错排原创 2017-11-02 22:35:06 · 601 阅读 · 0 评论 -
素数
求素数原创 2017-10-26 08:47:20 · 412 阅读 · 0 评论 -
循环三 找符合条件的最小数
找符合条件的最小数原创 2017-10-26 20:21:11 · 674 阅读 · 0 评论 -
循环三 (辗转赋值)计算母牛数
(辗转赋值)计算母牛数原创 2017-10-26 20:21:54 · 1031 阅读 · 0 评论 -
循环三 循环(字符转纯小数)
循环(字符转纯小数)原创 2017-10-26 20:22:37 · 694 阅读 · 0 评论 -
循环三 统计给定区间内素数的个数
统计给定区间内素数的个数原创 2017-10-26 20:23:50 · 2094 阅读 · 0 评论 -
二元一次方程求根
二元一次方程求根原创 2017-10-29 22:15:19 · 2317 阅读 · 0 评论 -
三角形面积之海伦公式
三角形面积之海伦公式原创 2017-10-29 22:23:05 · 3231 阅读 · 0 评论 -
约瑟夫环问题
1、下面有例题 2、给出从1开始和从0开始两种递推公式 0:f(n)=((f(n-1)+m)%n 1:f(n)=(f(n-1)+m-1)%n+1//为了防止求余后为0而没有第0个人 约瑟夫环问题描述: 一共有n个人,从1报数,报到第m个的时候淘汰,求活到最后一个的人的序号。普通解法:链表或者数组模拟此过程,由于太麻烦又耗时间,此处不贴代码数学解法使用上面两个公式递...原创 2018-07-24 09:25:38 · 680 阅读 · 0 评论 -
HDU 4993 Revenge of ex-Euclid
DescriptionIn arithmetic and computer programming, the extended Euclidean algorithm is an extension to the Euclidean algorithm, which computes, besides the greatest common divisor of integers a and ...原创 2018-07-24 08:54:23 · 343 阅读 · 0 评论 -
POJ-2739 Sum of Consecutive Prime Numbers
DescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive integer have? For example, the integer 53 ...原创 2018-07-24 08:29:51 · 291 阅读 · 0 评论 -
如何求闰年
闰年原创 2017-09-30 16:18:40 · 1820 阅读 · 0 评论 -
水仙花数
水仙花数原创 2017-09-30 16:23:58 · 1927 阅读 · 0 评论 -
康拓展开
康拓展开转载 2017-10-14 21:04:10 · 330 阅读 · 0 评论 -
最小公倍数和最大公约数
最大公约数、最小公倍数原创 2017-09-30 16:20:10 · 419 阅读 · 0 评论 -
秦九韶算法解多项式
写程序计算给定多项式f(x)= (i:0<=i<1000)i*x^i 在定点x = 1.1 处的值f(1.1) f1:f(x)=a0+a1x+…+anx^n f2:f(x)=a0+x(a1+x(…(an-1+x(an))…))#include <iostream>#include <cmath>using namespace std;#defin...原创 2018-08-03 11:21:29 · 1336 阅读 · 1 评论