E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Euler
project
euler
problem 14
LongestCollatzsequenceProblem14Thefollowingiterativesequenceisdefinedforthesetofpositiveintegers:n n/2(n iseven)n 3n +1(n isodd)Usingtheruleaboveandstartingwith13,wegeneratethefollowingsequence:13
u011466175
·
2013-10-05 23:00
Project
Euler
4 Largest palindrome product
ProjectEuler4Largestpalindromeproduct''' Apalindromicnumberreadsthesamebothways.Thelargestpalindromemadefromtheproductoftwo2-digitnumbersis9009=91×99. Findthelargestpalindromemadefromtheproductoftwo3-
ASD非你莫属
·
2013-10-04 14:55
python
Project
Euler
4 Largest palindrome product
ProjectEuler4Largestpalindromeproduct'''Apalindromicnumberreadsthesamebothways.Thelargestpalindromemadefromtheproductoftwo2-digitnumbersis9009=91×99.Findthelargestpalindromemadefromtheproductoftwo3-di
ASD非你莫属
·
2013-10-04 14:55
python
PYTHON
Project
Euler
3 Largest prime factor
ProjectEuler3Largestprimefactor''' Theprimefactorsof13195are5,7,13and29. Whatisthelargestprimefactorofthenumber600851475143? ''' frommathimport* m=600851475143 i=2 whilei<=m: ifm%i==0: printi m=m/i i+
ASD非你莫属
·
2013-10-04 13:51
python
Project
Euler
2 Even Fibonacci numbers
ProjectEuler2EvenFibonaccinumbers''' EachnewtermintheFibonaccisequenceisgeneratedbyaddingtheprevioustwoterms.Bystartingwith1and2,thefirst10termswillbe: 1,2,3,5,8,13,21,34,55,89,... Byconsideringtheter
ASD非你莫属
·
2013-10-04 12:26
python
Project
Euler
2 Even Fibonacci numbers
ProjectEuler2EvenFibonaccinumbers'''EachnewtermintheFibonaccisequenceisgeneratedbyaddingtheprevioustwoterms.Bystartingwith1and2,thefirst10termswillbe:1,2,3,5,8,13,21,34,55,89,...Byconsideringthetermsi
ASD非你莫属
·
2013-10-04 12:26
python
PYTHON
Project
Euler
1 Multiples of 3 and 5
ProjectEuler1Multiplesof3and5''' Ifwelistallthenaturalnumbersbelow10thataremultiplesof3or5,weget3,5,6and9.Thesumofthesemultiplesis23. Findthesumofallthemultiplesof3or5below1000. ''' frommathimport* m=
ASD非你莫属
·
2013-10-04 11:46
python
Project
Euler
1 Multiples of 3 and 5
ProjectEuler1Multiplesof3and5'''Ifwelistallthenaturalnumbersbelow10thataremultiplesof3or5,weget3,5,6and9.Thesumofthesemultiplesis23.Findthesumofallthemultiplesof3or5below1000.'''frommathimport*m=1000s
ASD非你莫属
·
2013-10-04 11:46
python
PYTHON
project
euler
problem 13:Large sum
Workoutthefirsttendigitsofthesumofthefollowingone-hundred50-digitnumbers.题意:给出一百个50位数字的数,算出他们的和,结果只取前十位数。思路:这题就POJ中的2109题:K^N=P,给N和P,求K。1 #include #include #include #include #include #include #include
u011466175
·
2013-10-01 13:00
project
euler
problem 11:Largest product in a grid
Problem11Inthe2020gridbelow,fournumbersalongadiagonallinehavebeenmarkedinred.080222973815004000750405077852125077910849499940178118576087174098436948045662008149317355791429937140675388300349133665527
u011466175
·
2013-10-01 12:00
project
euler
problem 10:Summation of primes
题意:二百万以下的素数相加#include #include #include #include #include #include #include usingnamespacestd; boola[2000005]; voidabc() { inti,j; a[1]=true; for(i=2;i<=2000005;i++) if(!a[i]) { for(j=2*i;j<=2000005;j
u011466175
·
2013-10-01 00:00
project
euler
problem 8:Largest product in a series
一串1000字符的串,5个连续的数相乘最大的是哪个5个连续的数?直接循环……#include #include #include #include #include #include #include usingnamespacestd; intmain() { chara[1005]={"731671765313306249192251196744265747423553491949349698
u011466175
·
2013-09-30 23:00
project
euler
problem 5:Smallest multiple
Problem52520isthesmallestnumberthatcanbedividedbyeachofthenumbersfrom1to10withoutanyremainder.Whatisthesmallestpositivenumberthatis evenlydivisible byallofthenumbersfrom1to20?这个有点像求素数一样,挺简单的……#include
u011466175
·
2013-09-30 22:00
UVa10311 - Goldbach and
Euler
#include #include #include usingnamespacestd; constintN=100000000+1; boolvis[N]; vectorvPrime; voidsieve(); intmain() { intn; boolflag; #ifndefONLINE_JUDGE freopen("uva_in.txt","r",stdin); #endi
wuli2496
·
2013-09-04 15:00
unity脚本小总结
1.使添加的游戏对象自动旋转创建一个脚本,把这个脚本绑定到这个cube上,然后在脚本的Update里写入: transform.localRotation*=Quaternion.
Euler
(0,30*
woailvmengmeng
·
2013-09-02 21:00
unity3d
GUI窗口
Project
Euler
001-006 解法总结
Problem1. Findthesumofallthemultiplesof3or5below1000. 题目要求找出所有1000以下的3或者5的倍数之和。 最简便的方法是,计算出1000以下总共有多少个3、5、15的倍数,然后用等差数列求三种数分别之和,最后3、5的倍数和减去15的倍数和就得到了结果。 NOte:这是因为15的倍数多算了一遍,所以要减去。 Problem2 Findthes
caozhankui
·
2013-08-27 01:00
uva 1342 - That Nice
Euler
Circuit
题意:平面上有一个包含n个点的一笔画,图案是封闭的。线段可以相交,但不会部分重叠,如图,求平面被分成多少部分。#include #include #include #defineeps1e-8 usingnamespacestd; intsig(doublea) { return(a>eps)-(a0||sig(b)>0)return0; vectoru=a1-a2; t=cross(w,u)
u010679062
·
2013-08-26 19:00
c
uva
amp
ACM-ICPC
hdu 1665 That Nice
Euler
Circuit(欧拉定理)
输入n个点,然后从第一个点开始,依次链接点i->点i+1,最后回到第一点(输入中的点n),求得到的图形将平面分成了多少部分。根据欧拉定理v_num+f_num-e_num=2可知,求出点数跟边数便能求出平面数。#include #include #include #include #include #include #include #include #include #include #incl
diary_yang
·
2013-08-22 16:00
Project
Euler
上的部分算法题 解法+笔记
很多算法的问题都涉及质数,所以有必要先讨论一下关于质数的那些事有以下事实①.除了2以外所有的质数都是奇数②.任何正整数N只能有一个大于根号N的质因子③.任何小于正整数N的合数都有小于根号N的因子Eratosthenes筛选法是用来寻找质数的算法,原理是这样的:比如求小于1000的质数,2是质数,去掉所有2的倍数,继,3没有被去掉,所以3是质数,去掉3的倍数,直到根号1000。这样剩下来的数就都是质
seandor
·
2013-08-16 17:00
Project
Euler
上的部分算法题 解法+笔记续
P11: LargestproductinagridInthe2020gridbelow,fournumbersalongadiagonallinehavebeenmarkedinred.0802229738150040007504050778521250779108494999401781185760871740984369480456620081493173557914299371406753
seandor
·
2013-08-15 22:00
欧拉函数
此函数以其首名研究者欧拉命名,它又称为
Euler
'stotientfunction、φ函数、欧拉商数等。例如φ(8)=4,因为1,3,5,7均和8互质。
GeiZuoZuoZuo
·
2013-08-07 21:00
欧拉回路与欧拉道路
欧拉回路与欧拉道路 图G的一个回路,若它恰通过G中每条边一次,则称该回路为欧拉(
Euler
)回路。如果一个图只是形成一个连通所有节点的链,且每一点只走一次,则成为欧拉道路。
y990041769
·
2013-07-18 18:00
c
有向图
并查集
欧拉回路
D
连通性
欧拉函数
此函数以其首名研究者欧拉命名,它又称为
Euler
'stotientfunction、φ函数、欧拉商数等。例如φ(8)=4,因为1,3,5,7均和8互质。
lezong2011
·
2013-07-16 20:00
数论
project
Euler
上的一些问题
随便做了几题,还是projectfirst,有空再来做Numberspiraldiagonals问题21 222324 2520 7 8 9 1019 6 1 21118 5 4 3 1217 161514 13计算对角线的数字之和看到对角线数值变化是1+(3+5+7+9)+(13+17+21+25)+(31+37+..)+...+1001*1001每四个数组成一组,该四个数为等差数列,开始
zhanglei0107
·
2013-07-01 21:00
ACM小结(6/16/2013)
HDU149题ZOJ9题POJ33题UVA15题CF20题
Euler
3题 共计:229题(不包括重复的)
X_White
·
2013-06-16 21:00
线性筛法求素数+欧拉函数+矩阵快速幂+快速求第n个斐波那契数
为要求1-N内的素数,返回素数的个数 inti,j,len=0; for(i=2;i1)res=res/a*(a-1); returnres; }求1-N所有数的欧拉函数值:voidInit(){
euler
ljd4305
·
2013-05-18 22:00
Project
Euler
23:Find the sum of all the positive integers which cannot be writt
A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means th
EmmaZhao
·
2013-05-16 12:00
python
projecteuler
求欧拉道路的算法
intG[MAXN][MAXN],visit[MAXN][MAXN]; voidinput(); voideuler(intu); intm,n; intmain(){ input();
euler
wangqisen
·
2013-05-09 21:58
欧拉道路算法
迄今为止A题数 - 2013/5/9
Hdu:117POJ:7ZOJ:1CF:5
Euler
:3 一共133,太少了=.= ----------- 2013/
Chuck_0430
·
2013-05-09 20:00
HDU 1787 GCD Again/HDU 2824 The
Euler
function(欧拉函数模板)
http://acm.hdu.edu.cn/showproblem.php?pid=1787#include usingnamespacestd; inteuler(intx) { intans=x; for(inti=2;i*i1)returnans=ans/x*(x-1); returnans; } intmain() { intn; while(~scanf("%d",&n)&&n){ pr
z690933166
·
2013-05-05 15:00
求解欧拉回路的算法
求解欧拉回路的算法应该会有很多吧,但我目前掌握的算法只有两种,一是usaco上提供的,还有一种是在离散数学书上看到的fleury算法: 1.usaco上提供的算法: #circuitisaglobalarray find_
euler
_circuit
lcj_cjfykx
·
2013-05-01 23:00
【欧拉计划2】Even Fibonacci numbers
该题来自Project
Euler
的第二题,求数值小于4百万的偶数项的和。今天继续我的欧拉计划。
xitong
·
2013-05-01 21:00
fibonacci
UVa 10129 Play on Words (
euler
path )
欧拉路径的问题。有向图判定是否存在欧拉道路的步骤:判定连通,判定点的入度和出度的关系!首先,因为单词的摆放是有方向的,所以要建一个有向图。其中,要注意的是,很可能会有重边出现,所以一定要做的一件事是记录重边的个数,因为在满足图去掉方向之后是连通的,那么就看每个点入度和出度的关系就好;然后,判断这个图是否连通,如果不连通,可以肯定是没有方案存在的;接下来是判断一共有几个点是入度和出度不等的,如果超过
AClion
·
2013-04-19 22:00
序列数字Project
Euler
014 & 015 序列数字
每日一贴,今天的内容关键字为序列数字 标题14:找出以100万以下的数字开始的最长序列。 以下迭代序列定义在数整集合上: n n/2(当n是偶数时)n 3n +1(当n是奇数时) 用应以上则规,并且以数字13开始,我们到得以下序列: 13 40 20 10 5 16 8 4 2 1 可以看出这个以13开始以1结束的序列含包10个项。虽然还没
siu23
·
2013-04-18 21:00
序列数字
python解决project
euler
题目的乐趣
寒假期间学习了python,现在基本上就能上手使用它来解决projecteuler里面的题目了,用python真的是没得说的,一个字“赞”。在C++中需要用一大堆代码实现的算法,在python中,只需要那么短短几行。而且还有惊艳的运行速度。借用《可爱的python》里面的一句话:“人生苦短,我用python”。 【projecteuler055】求经过一系列规则不能得到回文数的数的个数。题目在此
bibodeng
·
2013-03-21 18:21
linux
python
pe
python解决project
euler
题目的乐趣
寒假期间学习了python,现在基本上就能上手使用它来解决projecteuler里面的题目了,用python真的是没得说的,一个字“赞”。在C++中需要用一大堆代码实现的算法,在python中,只需要那么短短几行。而且还有惊艳的运行速度。借用《可爱的python》里面的一句话:“人生苦短,我用python”。【projecteuler055】求经过一系列规则不能得到回文数的数的个数。题目在此:I
bibodeng
·
2013-03-21 18:21
linux
PE
python
linux
Euler
_Problem6
Problem 6 The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 552 = 3025 He
tosee
·
2013-02-27 10:00
算法
Project Euler
和的平方与平方和之差
欧拉函数
它又称为
Euler
'stotientfunction、φ函数、欧拉商数等。
ilovexiaohao
·
2013-02-20 11:00
BIT1055 The
Euler
function
题意:给a和b,求f[a]+f[a+1]+....f[b]f为对应的欧拉函数值解法:线性筛法,因为欧拉函数是积性函数可用筛法计算欧拉函数值若p∤i,ϕ(p*i)=(p-1)*ϕ(i)若p|i,ϕ(p*i)=p*ϕ(i)根据以上两个式子将1到10^6内所有数的欧拉函数值通过筛法算出来然后用ans数组代表ans[i]=f[1]+f[2]+...f[ans]最后输入a和b时,结果就是ans[b]-ans
zhangwei1120112119
·
2013-02-04 11:00
Project
Euler
54 Poker hands(模拟+hash)
超级传送门:http://projecteuler.net/problem=54 刚看到题目描述,就联想到天津Regional的A题麻将那题,可惜没能AC,遗憾了好久。这题比麻将那题要简单一些,规则描述比较清楚,要比较两手梭哈牌的大小,我用了hash来存牌,定义了各种判定判断函数来进行判断。代码量还是比较大的,差不多600行,写的过程中很容易错。Unix/Linux设计思想——小即是美、每个函数的
michaelalan
·
2013-01-25 19:00
Project
Euler
51 Prime digit replacements(枚举)
超级传送门:http://projecteuler.net/problem=51 这题我是暴力枚举的,O3优化后2秒多。先枚举素数,再枚举要替换的位置,我用二进制来表述,设dc为当前枚举到素数的位数,则替换方法可以从1~ (1 #include #include usingnamespacestd; intp[100010]; intpIndex=0; inlineinti
michaelalan
·
2013-01-25 19:00
Project
Euler
26 Reciprocal cycles(计算有理小数循环节长度)
超级传送门:http://projecteuler.net/problem=26算法的核心思想:在除法过程中如果某一状态的除数与被除数和前面某一状态的相等,则后续的除法计算陷入循环,循环节长度就是这两个状态的距离。例子:计算1/7的循环节长度状态1:10/7 得1余3状态2:30/7 得4余2状态3:20/7 得2余6状态4:60/7 得8余4状态5:40/7 得5余5状态6:50/7 得7余1状
michaelalan
·
2013-01-15 14:00
Project
Euler
20 Factorial digit sum(大数乘法)
超级传送门:http://projecteuler.net/problem=20用了自己写的大数乘法模板,乘法模板利用了这儿介绍的加法模板,注意设定内部tmp和ans数组的大小。#include #include #include usingnamespacestd; voidadd(char*des,char*src) { chartmp[10100]; intlenDes=strlen(
michaelalan
·
2013-01-15 14:00
Project
Euler
13 Large sum(大数加法)
超级传送门:http://projecteuler.net/problem=13自己写的大数加法模板,用的时候注意设定tmp数组适当的长度,避免溢出或浪费空间。#include #include usingnamespacestd; charnum[150][51]= {"37107287533902102798797998220837590246510135740250", "4637693
michaelalan
·
2013-01-15 14:00
Exponential Fourier series指数傅里叶级数
citefromwikipediaExponentialFourierseriesWecanuse
Euler
'sformula,where i isthe imaginaryunit,togiveamoreconciseformula
zhanglei0107
·
2012-12-19 16:00
perl解析欧拉计划:Progect
Euler
1--2题
Problem1:1000一下,能被3,5整除的数的和Ifwelistallthenaturalnumbersbelow10thataremultiplesof3or5,weget3,5,6and9.Thesumofthesemultiplesis23.Findthesumofallthemultiplesof3or5below1000.my$sum=0; foreach(1..999) { $s
gaorongchao1990626
·
2012-12-07 11:00
Project
Euler
ProjectEulerb]MoreAbout展开]ProjectEulerb]MoreAbout展开编辑本段]ProjectEulerb]诞生ProjectEuler由ColinHughes(也被人称为
euler
gaorongchao1990626
·
2012-12-07 11:00
Euler
Angle and Quaternion
关于
Euler
角和四元数的学习,可以参考:http://en.wikipedia.org/wiki/Gimbalhttp://www.cnblogs.com/soroman/archive/2006/10
eryar
·
2012-12-01 22:00
【
Euler
】2
,f,g,h,i---s+b,c,d,e,f,g,h,i,j---s-a+j=c,d,e,f,g,h,i,j,k---s-a-b+j+k所以s=k-b,k是大于等于4000000的第二个数,b=2//
Euler
1
Flow_Source
·
2012-11-30 22:06
C
【
Euler
】2
答案:9227463(错误) 思想: a,b,c,d,e,f,g,h,i --- s + b,c,d,e,f,g,h,i,j --- s-a+j = c,d,e,f,g,h,i,j,k --- s-a-b+j+k 所以s=k-b,k是大于等于4
lltobe
·
2012-11-30 22:00
Euler
上一页
16
17
18
19
20
21
22
23
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他