`
rensanning
  • 浏览: 3514339 次
  • 性别: Icon_minigender_1
  • 来自: 大连
博客专栏
Efef1dba-f7dd-3931-8a61-8e1c76c3e39f
使用Titanium Mo...
浏览量:37481
Bbab2146-6e1d-3c50-acd6-c8bae29e307d
Cordova 3.x入门...
浏览量:604342
C08766e7-8a33-3f9b-9155-654af05c3484
常用Java开源Libra...
浏览量:678107
77063fb3-0ee7-3bfa-9c72-2a0234ebf83e
搭建 CentOS 6 服...
浏览量:87280
E40e5e76-1f3b-398e-b6a6-dc9cfbb38156
Spring Boot 入...
浏览量:399819
Abe39461-b089-344f-99fa-cdfbddea0e18
基于Spring Secu...
浏览量:69075
66a41a70-fdf0-3dc9-aa31-19b7e8b24672
MQTT入门
浏览量:90487
社区版块
存档分类
最新评论

初学编程的必做数学题目

阅读更多
初学编程时,这些一定是必做的数学题目!

(1) 数字

奇数(Odd)偶数(Even)
奇数就是不能被2整除的整数。偶数就是能被2整除的整数。

闰年(Leap year)
能被4整除但不能被100整除,或能被400整除的年份即为闰年。

质数(Prime Number) 也叫素数,除了1和本身以外不再有其他因数的整数。如:2、3、5、7、11、13、17、19
https://en.wikipedia.org/wiki/Prime_number
http://mathworld.wolfram.com/PrimeNumber.html

合数(Composite number) 与质数相反,除了能被1和本身整除外,还能被其他数整除的数。如:4、6、8、9、10
https://en.wikipedia.org/wiki/Composite_number
http://mathworld.wolfram.com/CompositeNumber.html

完美数(Perfect number) 一个数恰好等于它的因子之和。如:6=1+2+3
https://en.wikipedia.org/wiki/Perfect_number
http://mathworld.wolfram.com/PerfectNumber.html

亲和数(Amicable number) 如果两个数,你的所有真因数之和等于我,我的所有真因数之和等于你,则我们是一对亲和数。如:(220, 284), (1184, 1210)
https://en.wikipedia.org/wiki/Amicable_numbers
http://mathworld.wolfram.com/AmicablePair.html

回文数(Palindrome number) 一个数正读和反读是相同的整数。如:16461
https://en.wikipedia.org/wiki/Palindromic_number
http://mathworld.wolfram.com/PalindromicNumber.html

水仙花数(Narcissistic number) 一个三位数等于每个数字的n次幂之和。如:153=1^3+5^3+3^3。水仙花数共有4个,分别为:153、370、371、407。
阿姆斯特朗数(Armstrong number) 比水仙花数范围大,不局限于三位数。
https://en.wikipedia.org/wiki/Narcissistic_number
http://mathworld.wolfram.com/NarcissisticNumber.html

斐波那契数列(Fibonacci number) 每一个数都是它前面两个数的和。 F(n)=F(n-1)+F(n-2) 具体数列为:1,1,2,3,5,8,13,21,34,55,89,144,...
泰波那契数列(Tribonacci number) 把斐波那契数列的概念推广至三个数。 T(n)=T(n-1)+T(n-2)+T(n-3)
https://en.wikipedia.org/wiki/Fibonacci_number
http://mathworld.wolfram.com/FibonacciNumber.html

勾股数(Pythagorean Triple) a^2+b^2=c^2
https://en.wikipedia.org/wiki/Pythagorean_triple
http://mathworld.wolfram.com/PythagoreanTriple.html

π PI=4*(1-1/3+1/5-1/7+1/9-1/11+1/13-1/15+...)
https://en.wikipedia.org/wiki/Pi
http://mathworld.wolfram.com/Pi.html

调和级数(Harmonic series) H(n)=1+1/2+1/3+1/4+...+1/n
https://en.wikipedia.org/wiki/Harmonic_series_(mathematics)
http://mathworld.wolfram.com/HarmonicSeries.html

(2) 运算

求和(Sum) 1+2+3+...+n
https://en.wikipedia.org/wiki/Summation
http://mathworld.wolfram.com/Sum.html

阶乘(Factorial) n!=n*(n-1)...2*1
https://en.wikipedia.org/wiki/Factorial
http://mathworld.wolfram.com/Factorial.html

约数(Factor/Divisor)
https://en.wikipedia.org/wiki/Divisor
http://mathworld.wolfram.com/Divisor.html

最大公约数(GCD:Greatest Common Divisor)
https://en.wikipedia.org/wiki/Greatest_common_divisor
http://mathworld.wolfram.com/GreatestCommonDivisor.html

最小公倍数(LCM:Lowest Common Multipl)
https://en.wikipedia.org/wiki/Least_common_multiple
http://mathworld.wolfram.com/LeastCommonMultiple.html

(3) 打印图形

金字塔Pyramid、菱形Diamond


箭头


其他形状


帕斯卡三角(Pascal Triangle) 也叫杨辉三角


九九乘法表(Multiplication Table)



(4) 汉诺塔(Hanoi Tower)

有A、B和C 3跟柱子,在A上从下往上按照从小到大的顺序放着64个圆盘,以B为中介,把盘子全部移动到C上。移动过程中,要求任意盘子的下面要么没有盘子,要么只能有比它大的盘子。

https://en.wikipedia.org/wiki/Tower_of_Hanoi
  • 大小: 3.7 KB
  • 大小: 22.4 KB
  • 大小: 3.5 KB
  • 大小: 3.2 KB
  • 大小: 7.6 KB
  • 大小: 6.4 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics