- 博客(3)
- 收藏
- 关注
原创 Java实现数组
public class Array { private int data[]; // 数组大小 private int n; //数组实际元素个数 private int count; public Array(int capacity) { this.data = new int[capacity]; this.n = capacity; this.count = 0; } public .
2021-04-28 10:46:16 136
原创 用Python实现斐波那契数列
#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Fri May 17 19:39:06 2019@author: tungleung"""a = 1b = 1print(1, end = ' ')print(1, end = ' ')for x in range(2, 100000): if x =...
2019-05-17 20:01:14 206
原创 用Python寻找水仙花数
100天学Python之第五天水仙花数(Narcissistic number)也被称为超完全数字不变数(pluperfect digital invariant, PPDI)、自恋数、自幂数、阿姆斯壮数或阿姆斯特朗数(Armstrong number),水仙花数是指一个 3 位数,它的每个位上的数字的 3次幂之和等于它本身(例如:1^3 + 5^3+ 3^3 = 153)。import ma...
2019-05-17 18:02:32 3830
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人