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 33
# -*- coding: cp936 -*- from __future__ import division def Func(m,n): sm=str(m) sn=str(n) bm1=int(sm[0]) #得到分子的十位数 bm2=int(sm[1]) #得到分子的个位数 bn1=int(sn[0]) #得到分母的十位数 bn2=int(s
卓尔
·
2014-06-13 12:00
Euler
_problem_18 for python
如下所示给出2个解法defeuler_problem_18_1(): """ thisproblemspendmyhalf-daybutnotingtofinished,sobad """ rows=''' 3 74 246 100593 ''' rows=reversed([map(int,row.split()) forrowinrows.strip()
u012798391
·
2014-05-28 15:00
python
Euler
_problem_14 for python
Euler
14的不同解法----所涉及的知识1.yield2.BF3.decorator4.cache5.等等defeuler_problem_14(): """ 最直接粗暴的解法:就是直接如下所示了
u012798391
·
2014-05-27 15:00
python
欧拉函数
thenumberofiwheregcd(i,n)=1and1 inteuler(intn) { intret=n; for(inti=2;i*i constintN=1e5+5; intphi[N]; voidpre_
euler
dgq8211
·
2014-04-27 16:00
UVa 1342 That Nice
Euler
Circuit(几何)
题目链接:UVa1342ThatNiceEulerCircuit几何。欧拉定理,设平面图的顶点数、边数、和面数分别为V,E和F,则V+F-E=2。然后求出来顶点数和边数就可以了。主要还是用了白书上的几何模版,很好很强大。#include #include #include #include usingnamespacestd; constdoubleeps=1e-10; constintMAX
fobdddf
·
2014-04-21 21:00
[物理学与PDEs]第2章习题参考解答
[物理学与PDEs]第2章习题1 无旋时的
Euler
方程 [物理学与PDEs]第2章习题2 质量力有势时的能量方程 [物理学与PDEs]第2章习题3 Laplace
·
2014-04-12 20:00
des
POJ 1041 John's trip (在POJ首题~~经典的欧拉回路)
,如
euler
()打印路径的方法,以及存入栈中倒着输出的方法,以及作为欧拉回路不能存在奇点。再者,除去上面讲的欧拉回路的知识,这道题本身也是一道非常好的题目,需要思路和对简单算法的灵活变通。
u013382399
·
2014-04-08 11:00
算法
poj
euler回路
UVALive 3263 That Nice
Euler
Circuit
给出一个点的序列,按顺序做一笔画,求最后的图形把平面分成了几部分。 欧拉定理:E:线段数,V节点数,F平面数;有F+V-E==2. 所以存下来所有线段之后,求出不同的交点数,再根据这些交点找出分割后的线段数,最后又公式算出F即可。#include #include #include #include #include #include typedefdoubletype; usingnam
yanglei040
·
2014-04-07 18:00
[家里蹲大学数学杂志]第237期
Euler
公式的美
1
Euler
公式 $e^{i\pi}+1=0$ (1) 它把 a. $e:$ 自然对数的底 $\approx 2. 718281828459$ (数分) b.
·
2014-03-10 09:00
Euler
欧拉函数的应用 : TOJ 3611 Calculation 2 && TOJ 3300
Euler
Function
首先先说明欧拉函数: 在数论,对正整数n,欧拉函数是少于或等于n的数中与n互质的数的数目;φ函数的值通式:φ(x)=x(1-1/p1)(1-1/p2)(1-1/p3)(1-1/p4)…..(1-1/pn),其中p1,p2……pn为x的所有质因数,x是不为0的整数。φ(1)=1(唯一和1互质的数(小于等于1)就是1本身)。(注意:每种质因数只一个。比如12=2*2*3那么φ(12)=12*(1-1/
u013652219
·
2014-03-01 22:00
欧拉函数
TOJ
逆序数对
[家里蹲大学数学杂志]第236期钟玉泉复变函数论前六章第二组习题参考解答
解答: 由
Euler
公式, $$\bex \mbox{原式}=\frac{(e^{i5\varphi})^2}{(e^{-i3\var
·
2014-02-13 09:00
函数
POJ 2284 That Nice
Euler
Circuit (LA 3263 HDU 1665)
http://poj.org/problem?id=2284https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1264http://acm.hdu.edu.cn/showproblem.php?pid=1665题目大意:平面上有一个包含n个端点
murmured
·
2014-02-10 20:00
编程
ACM
poj
HDU
la
欧拉回路(
Euler
Circuits)
首先介绍一下什么是欧拉回路,这个是一个图问题,也就是说假设我们拿着一只笔,在纸上画一个图,在这个期间笔不能离开纸,同时每一个边只能画一次。也就是人们常说的一笔完成。如下面例子所示图a,图b可以一笔画出来,而图c不可以。欧拉回路就是研究这个问题:什么样的图能够一笔画成。我先先来分析上面的图a,可以发现对于图a,虽然可以一笔画成,但是却无法在结束时回到最初的起始点,也就是说假设我们从左下角的点开始画,
changyuanchn
·
2013-12-04 11:00
四元数
旋转的方式大致分为三种:
Euler
旋转,矩阵旋转,以及四元数旋转。 这里稍微记录下我目前对于四元数旋转的理解。
·
2013-11-24 16:00
伽马贝塔函数
在数理方程、概率论等学科经常遇到以下的含参变量的积分 , 它们依次为第一类和第二类欧拉(
Euler
1707~1783 瑞士数学家)积分,或依次称为贝塔(Bata)函数和伽马(Gamma
thd52java
·
2013-11-13 09:00
机器学习
伽马贝塔函数
在数理方程、概率论等学科经常遇到以下的含参变量的积分 , 它们依次为第一类和第二类欧拉(
Euler
1707~1783 瑞士数学家)积分,或依次称为贝塔(Bata)函数和伽马(Gamma
yueyedeai
·
2013-11-13 09:00
机器学习
MATLAB 积分算法
在SIMULINK的仿真过程中选择合适的算法是很重要的,仿真算法是求常微分方程、传递函数、状态方程解的数值计算方法,这些方法主要有欧拉法(
Euler
)、阿达姆斯法(Adams)、龙格·库塔法(Rung-Kutta
Justpayne
·
2013-11-11 21:44
MATLAB
Project
Euler
problem 26
ReciprocalcyclesProblem26Aunitfractioncontains1inthenumerator.Thedecimalrepresentationoftheunitfractionswithdenominators2to10aregiven:1/2= 0.51/3= 0.(3)1/4= 0.251/5= 0.21/6= 0.1(6)1/7= 0.(142857)1/8=
u011466175
·
2013-10-31 23:00
FZUOJ A^B mod C (FZOJ1752 快速幂模+二分求A*B)(FZOJ1759
euler
函数+快速幂)
题目:http://acm.fzu.edu.cn/problem.php?pid=1752Problem1752A^BmodCTimeLimit:1000mSecMemoryLimit:32768KBProblemDescriptionGivenA,B,C,YoushouldquicklycalculatetheresultofA^BmodC.(1#includeusingnamespacestd
cowboy90
·
2013-10-28 21:53
ACM_数学
project
euler
problem 22对文件的处理
其实如果是小的输入的话,是个水题,但是这里是文件输入方式的,所以考查的是文件输入……刚才会了文件的读取之后,这题正好可以运用,哈哈……#include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; intmai
u011466175
·
2013-10-28 20:00
HDU 1141 校庆神秘建筑 知六边长求四面体体积
欧拉四面体问题
Euler
'sTetrahedronProblem以六条棱表示四面体的体积.涉及的知识点知识点一:矢量的数量积知识点二:矢量的向量积用六条棱长表示的四面体体积公式 内容:将四面体放入直角坐标系内
u012161037
·
2013-10-21 18:00
project
euler
problem 35求一个数的所有循环数都是素数的总共有多少个
这题刚开始想到的是怎么求出这些循环数,然后求出来以后判断就容易多了。但是刚开始想的是用取模和相除的求出的循环数,但是有点麻烦,而且程序总有点问题,所以我就想了另外的一个思路。以前记得做题的时候有道题也是关于循环数的,而循环数可以先把它变成字符串,然后这个字符串再连接自己的字符串,如:15234,连接后为:1523415234,然后就可以知道这些循环数了,即第二个数为从第二位取5个数为:52341,
u011466175
·
2013-10-20 16:00
project
euler
problem 32又是暴搜
感觉20到30题都是暴力搜索…………#include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; intmain() { inti,sum=0,sum1,a[10]={1,1,2,6,24,120,720,5
u011466175
·
2013-10-20 15:00
project
euler
problem 30
DigitfifthpowersProblem30Surprisinglythereareonlythreenumbersthatcanbewrittenasthesumoffourthpowersoftheirdigits:1634=14 +64 +34 +448208=84 +24 +04 +849474=94 +44 +74 +44As1=14 isnotasumitisnotinclude
u011466175
·
2013-10-20 14:00
project
euler
problem 29数的多次幂的重复个数
DistinctpowersProblem29Considerallintegercombinationsof ab for2 a 5and2 b 5:22=4,23=8,24=16,25=3232=9,33=27,34=81,35=24342=16,43=64,44=256,45=102452=25,53=125,54=625,55=3125Iftheyarethenplacedinnu
u011466175
·
2013-10-20 13:00
project
euler
problem 28
NumberspiraldiagonalsProblem28Startingwiththenumber1andmovingtotherightinaclockwisedirectiona5by5spiralisformedasfollows:21 222324 2520 7 8 9 1019 6 1 21118 5 4 3 1217 161514 13Itcanbeverifiedthatt
u011466175
·
2013-10-11 13:00
project
euler
problem 24
LexicographicpermutationsProblem24Apermutationisanorderedarrangementofobjects.Forexample,3124isonepossiblepermutationofthedigits1,2,3and4.Ifallofthepermutationsarelistednumericallyoralphabetically,wec
u011466175
·
2013-10-10 22:00
project
euler
problem 25 大数连加Fibonacci序列
1000-digitFibonaccinumberProblem25TheFibonaccisequenceisdefinedbytherecurrencerelation:Fn =Fn1 +Fn2,whereF1 =1andF2 =1.Hencethefirst12termswillbe:F1 =1F2 =1F3 =2F4 =3F5 =5F6 =8F7 =13F8 =21F9 =34F10 =5
u011466175
·
2013-10-09 23:00
Project
Euler
p26 - Reciprocal cycles
http://projecteuler.net/problem=26 找 d<1000 的 1/d 中有最长小数部分循环段的d. 原想直接把结果用 double 存起来, 打印出来找找就好了, 后来发现 double 的精度不够某些循环段... 还好小学算术做得多, 观察发现如果除数再次出现, 小数部分才会开始循环, 于是找重复出现的除数就好了. 45
mysh
·
2013-10-09 15:00
euler 算法
Project
Euler
p12 - Highly divisible triangular number
http://projecteuler.net/problem=12 求因数个数大于500的数, 关键在于下面两个隐藏的条件 triangle(i)=i*(i+1)/2 divisors(a*b)=divisors(a)*divisors(b) countDivisors 其实它还可以优化成递归求解, 而不是一个个去数, 不过量
mysh
·
2013-10-08 17:00
算法
Euler
Project
Euler
p14 - Longest Collatz sequence
发现一个好玩的站, 没事刷刷题 http://projecteuler.net/problem=14 找一百万以内的最大起始数, 一个个数过去就好了, 用上DP, 45ms @Test public void t2() { final int R = 1_000_001; int[] record = new int[R]; recor
mysh
·
2013-10-08 17:00
算法
Euler
Project
Euler
10 Summation of primes
ProjectEuler10Summationofprimes#!/usr/bin/envpython #-*-coding:utf-8-*- ''' Thesumoftheprimesbelow10is2+3+5+7=17. Findthesumofalltheprimesbelowtwomillion. ''' frommathimport* defisPrime(num): ifnum<2
ASD非你莫属
·
2013-10-08 13:32
python
Project
Euler
10 Summation of primes
ProjectEuler10Summationofprimes#!/usr/bin/envpython#-*-coding:utf-8-*-'''Thesumoftheprimesbelow10is2+3+5+7=17.Findthesumofalltheprimesbelowtwomillion.'''frommathimport*defisPrime(num):ifnum<2:returnFa
ASD非你莫属
·
2013-10-08 13:32
python
PYTHON
Project
Euler
9 Special Pythagorean triplet
ProjectEuler9SpecialPythagoreantriplet''' APythagoreantripletisasetofthreenaturalnumbers,a
ASD非你莫属
·
2013-10-08 13:28
python
Project
Euler
9 Special Pythagorean triplet
ProjectEuler9SpecialPythagoreantriplet'''APythagoreantripletisasetofthreenaturalnumbers,a
ASD非你莫属
·
2013-10-08 13:28
python
PYTHON
Project
euler
problem 21找合适的一对数之总和
AmicablenumbersProblem21Letd(n)bedefinedasthesumofproperdivisorsof n (numberslessthan n whichdivideevenlyinto n).Ifd(a)= b andd(b)= a,where a b,then a and b areanamicablepairandeachof a and b arecall
u011466175
·
2013-10-07 16:00
project
euler
problem 19 数周末
CountingSundaysProblem19Youaregiventhefollowinginformation,butyoumayprefertodosomeresearchforyourself.1Jan1900wasaMonday.ThirtydayshasSeptember,April,JuneandNovember.Alltheresthavethirty-one,SavingFeb
u011466175
·
2013-10-07 15:00
project
euler
problem 18 动态规划
这题就像POJ中的1163题。一样解法,简单的动态规划。#include #include #include #include #include #include #include usingnamespacestd; inta[101][101]; intmain() { inti,j; for(i=0;i>a[i][j]; for(i=13;i>=0;i--) for(j=0;j
u011466175
·
2013-10-06 21:00
project
euler
problem 12
HighlydivisibletriangularnumberProblem12Thesequenceoftrianglenumbersisgeneratedbyaddingthenaturalnumbers.Sothe7th trianglenumberwouldbe1+2+3+4+5+6+7=28.Thefirsttentermswouldbe:1,3,6,10,15,21,28,36,45,
u011466175
·
2013-10-06 21:00
project
euler
problem 17
NumberlettercountsProblem17Ifthenumbers1to5arewrittenoutinwords:one,two,three,four,five,thenthereare3+3+5+4+4=19lettersusedintotal.Ifallthenumbersfrom1to1000(onethousand)inclusivewerewrittenoutinwords
u011466175
·
2013-10-06 20:00
Project
Euler
8 Largest product in a series
ProjectEuler8Largestproductinaseries#!/usr/bin/envpython #-*-coding:utf-8-*- ''' Findthegreatestproductoffiveconsecutivedigitsinthe1000-digitnumber. 73167176531330624919225119674426574742355349194934
ASD非你莫属
·
2013-10-06 17:55
python
Project
Euler
8 Largest product in a series
ProjectEuler8Largestproductinaseries#!/usr/bin/envpython#-*-coding:utf-8-*-'''Findthegreatestproductoffiveconsecutivedigitsinthe1000-digitnumber.7316717653133062491922511967442657474235534919493496983
ASD非你莫属
·
2013-10-06 17:55
python
PYTHON
project
euler
problem 15
因为只能往右或者往下走到右下角,所以需要走40步,而20步是横着走的,或者可以说20步是坚着走的,所以由组合数C(20,40)即结果。C(20,40)=39*37*35*33*31*29*92=137846528820
u011466175
·
2013-10-06 15:00
project
euler
problem 16:2^1000结果各位数求和
题意:就是求2^1000之后,结果各位数求和。思路:看到这题的时候有种似曾相识的感觉,因为POJ1604求的是阶乘,所以方法是一样的。而1604的方法如下:for(i=2;i #include #include #include #include #include #include usingnamespacestd; #defineM3000 intf[M]; intmain() { intj,
u011466175
·
2013-10-06 14:00
Project
Euler
7 10001st prime
ProjectEuler710001stprime ''' Bylistingthefirstsixprimenumbers:2,3,5,7,11,and13,wecanseethatthe6thprimeis13. Whatisthe10001stprimenumber? ''' frommathimport* defisPrime(num): ifnum<2: returnFalse ifn
ASD非你莫属
·
2013-10-06 14:49
python
Project
Euler
7 10001st prime
ProjectEuler710001stprime'''Bylistingthefirstsixprimenumbers:2,3,5,7,11,and13,wecanseethatthe6thprimeis13.Whatisthe10001stprimenumber?'''frommathimport*defisPrime(num):ifnum<2:returnFalseifnum==2:retu
ASD非你莫属
·
2013-10-06 14:49
python
PYTHON
Project
Euler
6 Sum square difference
ProjectEuler6Sumsquaredifference'''Thesumofthesquaresofthefirsttennaturalnumbersis,12+22+...+102=385Thesquareofthesumofthefirsttennaturalnumbersis,(1+2+...+10)2=552=3025Hencethedifferencebetweenthesum
ASD非你莫属
·
2013-10-06 13:42
python
PYTHON
Project
Euler
6 Sum square difference
ProjectEuler6Sumsquaredifference ''' Thesumofthesquaresofthefirsttennaturalnumbersis, 12+22+...+102=385 Thesquareofthesumofthefirsttennaturalnumbersis, (1+2+...+10)2=552=3025 Hencethedifferencebetween
ASD非你莫属
·
2013-10-06 13:42
python
Project
Euler
5 Smallest multiple
ProjectEuler5Smallestmultiple算法存在一定问题,效率不能保证 ''' 2520isthesmallestnumberthatcanbedividedbyeachofthenumbersfrom1to10withoutanyremainder. Whatisthesmallestpositivenumberthatisevenlydivisiblebyallofthenu
ASD非你莫属
·
2013-10-06 13:54
pytho
Project
Euler
5 Smallest multiple
ProjectEuler5Smallestmultiple算法存在一定问题,效率不能保证'''2520isthesmallestnumberthatcanbedividedbyeachofthenumbersfrom1to10withoutanyremainder.Whatisthesmallestpositivenumberthatisevenlydivisiblebyallofthenumbe
ASD非你莫属
·
2013-10-06 13:54
pytho
PYTHON
上一页
15
16
17
18
19
20
21
22
下一页
按字母分类:
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
其他