从阶乘的实现的例子,一步一步看程序架构的演化。

阶乘设计的演化过程

1 递归方式

public static int factorial(int n){
    if (n > 0) return 1;
    return n * factorial(n-1);
}

2 封装进一个工具类

public class FactorialUtil{
    public static int factorial(int n) {
        if (n == 0) return 1;
        return n * factorial(n-1);
    }
}

3 迭代实现

public class FactorialUtil{
    public static int factorial(int n){
        int ret = 1;
        for (int i = 1; i <= n; ++i) ret *= i;
        return ret;
    }
}

4 解决返回值超出整型最大值问题

public class FactorialUtil{
    public static BigInteger factorial(int n){
        BigInteger ret = BigInteger.ONE;
        for (int i = 1; i <= n; ++i) ret = ret.multiply(BigInteger.valueOf(i));
        return ret;
    }
}

5 加入缓存机制

public class FactorialUtil{
    static HashMap<Integer,BigInteger> cache = new HashMap<Integer,BigInteger>();
    
    public static BigInteger factorial(int n){
        BigInteger ret;
    
        if (n == 0) return BigInteger.ONE;
        if (null != (ret = cache.get(n))) return ret;
        ret = BigInteger.valueOf(n).multiply(factorial(n-1));
        cache.put(n, ret);
        return ret;
    }
}

6 使用接口编程,把算法实现推向实现,即使用了策略模式

工具类:

public class FactorialUtil{
    private static FactorialUtil singleton;
    private FactorialAlgorithm algorithm;

    /**
     * Default (internal) constructor constructs our default algorithm.
     */
    private FactorialUtil()
    {
        algorithm = new CachedFactorialImplementation();
    }

    /**
     * New initializer which allows selection of the algorithm mechanism
     * @param algorithm
     */
    public FactorialUtil(FactorialAlgorithm a)
    {
        algorithm = a;
    }

    /**
     * Default public interface for handling our factorial algorithm. Uses
     * the old standard established earlier for calling into our utility class.
     * @param n
     * @return
     */
    public static BigInteger factorial(int n)
    {
        if (singleton == null) {
            // Use default constructor which uses default algorithm
            singleton = new FactorialUtil();
        }
        return singleton.doFactorial(n);
    }

    /**
     * New mechanism which allows us to instantiate individual factorial
     * utilitiy classes and invoke customized factorial algorithms directory.
     * @param n
     * @return
     */
    private BigInteger doFactorial(int n)
    {
        // Defer to our algorithm
        return algorithm.factorial(n);
    }
}

接口:

public interface FactorialAlgorithm{
    BigInteger factorial(int n);
}

缓存实现

public class CachedFactorialImplementation implements FactorialAlgorithm
{
    static HashMap<Integer,BigInteger> cache = new HashMap<Integer,BigInteger>();

    @Override
    public BigInteger factorial(int n)
    {
        BigInteger ret;

        if (n == 0) return BigInteger.ONE;
        if (null != (ret = cache.get(n))) return ret;
        ret = BigInteger.valueOf(n).multiply(factorial(n-1));
        cache.put(n, ret);
        return ret;
    }
}

循环实现

public class LoopedFactorialImplementation implements FactorialAlgorithm
{
    @Override
    public BigInteger factorial(int n)
    {
        BigInteger ret = BigInteger.ONE;
        for (int i = 1; i <= n; ++i) ret = ret.multiply(BigInteger.valueOf(i));
        return ret;
    }
}

这种方式无法实现运行时动态选择使用哪个实现类。即,无法完成如下的调用。

7 如何实现这种方式的动态调用?

public static void main(String[] args){
    System.getProperties().setProperty("com.chaosinmotion.factorialalgorithm", "cachedAlgorithm");//指定实现方式为cachedAlgorithm
    System.out.println("5! = " + FactorialUtil.factorial(5));//系统会使用了cachedAlgorithm方式
}

7.1 用map存储类映射

/**
 * Factory class manages the factorial algorithms in our system.
 * @author wwoody
 *
 */
public class FactorialAlgorithmFactory{//阶乘算法工厂
    private static HashMap<String,FactorialAlgorithm> mapping = new HashMap<String,FactorialAlgorithm>();
    private static HashMap<String,Class<? extends FactorialAlgorithm>> classMapping = new HashMap<String,Class<? extends FactorialAlgorithm>>();
    private static FactorialAlgorithm defaultAlgorithm = new CachedFactorialImplementation();

    /** Static initializer registers some of my known classes */
    static {
        try {
            Class.forName("com.chaosinmotion.factorial.LoopedFactorialImplementation");//这个类被注册进了classMapping
            Class.forName("com.chaosinmotion.factorial.CachedFactorialImplementation");//这个类被注册进了classMapping
        }
        catch (ClassNotFoundException e) {
            // Should never happen.
        }
    }

    /** Get the default algorithm for computing factorials */
    public static FactorialAlgorithm getDefaultAlgorithm()
    {
        if (defaultAlgorithm == null) {
            // Warning: this will fail if for whatever reason CachedFactorialImplementation
            // is not in the class path.
            defaultAlgorithm = getAlgorithm("cachedAlgorithm");
        }
        return defaultAlgorithm;
    }

    /** Get the factorial algorithm specified by name */
    public static FactorialAlgorithm getAlgorithm(String name)
    {
        FactorialAlgorithm f = mapping.get(name);
        if (f == null) {
            // We haven't created an instance yet. Get it from the class mapping.
            Class<? extends FactorialAlgorithm> c = classMapping.get(name);
            if (c != null) {
                // Create a new instance of the factorial algorithm specified
                try {
                    f = c.newInstance();
                    mapping.put(name, f);
                    return f;
                }
                catch (Exception e) {
                    // Log the error
                    Logger.getLogger("com.chaosinmotion.factorial").
                        warning("Unable to instantiate algorithm " +
                                c.getCanonicalName() + ", named " + name);
                }
            }
            return getDefaultAlgorithm(); // return something.
        }
        else return f;
    }

    /** Register the class so we can construct a new instance if not already initialized */
    public static void registerAlgorithm(String name, Class<? extends FactorialAlgorithm> f)
    {
        classMapping.put(name, f);
    }
}

7.2 重写阶乘工具类

public class FactorialUtil{
    private static FactorialUtil singleton;
    private FactorialAlgorithm algorithm;

    /**
     * Default (internal) constructor constructs our default algorithm.
     */
    private FactorialUtil()
    {
        String name = System.getProperty("com.chaosinmotion.factorialalgorithm", "cachedAlgorithm");
        if (name == null) {
            algorithm = FactorialAlgorithmFactory.getDefaultAlgorithm();
        } else {
            algorithm = FactorialAlgorithmFactory.getAlgorithm(name);
        }
    }

    /**
     * New initializer which allows selection of the algorithm mechanism
     * @param algorithm
     */
    public FactorialUtil(FactorialAlgorithm a)
    {
        algorithm = a;
    }

    /**
     * Utility to create by name. Calls into FactorialAlgorithmFactory to
     * actually get the algorithm.
     * @param name
     */
    public FactorialUtil(String name)
    {
        algorithm = FactorialAlgorithmFactory.getAlgorithm(name);
    }

    /**
     * Default public interface for handling our factorial algorithm. Uses
     * the old standard established earlier for calling into our utility class.
     * @param n
     * @return
     */
    public static BigInteger factorial(int n)
    {
        if (singleton == null) {
            // Use default constructor which uses default algorithm
            singleton = new FactorialUtil();
        }
        return singleton.doFactorial(n);
    }

    /**
     * New mechanism which allows us to instantiate individual factorial
     * utilitiy classes and invoke customized factorial algorithms directory.
     * @param n
     * @return
     */
    private BigInteger doFactorial(int n)
    {
        // Defer to our algorithm
        return algorithm.factorial(n);
    }
}

7.3 缓存实现

public class CachedFactorialImplementation implements FactorialAlgorithm
{
    static HashMap<Integer,BigInteger> cache = new HashMap<Integer,BigInteger>();

    static {
        FactorialAlgorithmFactory.registerAlgorithm("cachedAlgorithm", CachedFactorialImplementation.class);//被注册进classMapping
    }

    @Override
    public BigInteger factorial(int n)
    {
        BigInteger ret;

        if (null != (ret = cache.get(n))) return ret;
        ret = BigInteger.valueOf(n).multiply(factorial(n-1));
        cache.put(n, ret);
        return ret;
    }
}

7.4 迭代实现

public class LoopedFactorialImplementation implements FactorialAlgorithm
{
    static {
        FactorialAlgorithmFactory.registerAlgorithm("loopedAlgorithm", LoopedFactorialImplementation.class);//被注册进classMapping
    }
    @Override
    public BigInteger factorial(int n)
    {
        BigInteger ret = BigInteger.ONE;
        for (int i = 1; i <= n; ++i) ret = ret.multiply(BigInteger.valueOf(i));
        return ret;
    }
}

7.5 递归实现

public class RecursiveFactorialImplementation implements FactorialAlgorithm
{
    static {
        FactorialAlgorithmFactory.registerAlgorithm("recursiveAlgorithm", RecursiveFactorialImplementation.class);
    }

    @Override
    public BigInteger factorial(int n)
    {
        if (n == 0) return BigInteger.ONE;
        return BigInteger.valueOf(n).multiply(factorial(n-1));
    }
}

7.6 调用例子

public static void main(String[] args){
    try {
        Class.forName("com.chaosinmotion.factorial.RecursiveFactorialImplementation");
    }
    catch (ClassNotFoundException e) {
        // if this fails, no matter; we'll still use the default implementation.
    }
    System.getProperties().setProperty("com.chaosinmotion.factorialalgorithm", "recursiveAlgorithm");
    System.out.println("5! = " + FactorialUtil.factorial(5));
}

7.7 总结

程序员想要使用自己的实现类来完成阶乘运算,只需要

  1. 写一个实现了 FactorialAlgorithm 接口的类
  2. 在这个类的装载过程里里完成对自己的注册
  3. 使用
    1. 装载自己的实现类 Class.forName(…);
    2. 设置系统属性,供程序从classMap中查找自己的实现类。

8 应用

JDBC Driver 的实现,就是类似方式:

Class.forName("org.gjt.mm.mysql.Driver");
Connection con = DriverManager.getConnection(url,?myLogin", "myPassword");

实际上jdbc driver有一个静态初始化

static {
    try {
        java.sql.DriverManager.registerDriver(new Driver());
    } catch (SQLException E) {
        throw new RuntimeException("Can't register driver!");
    }
}

参考: http://chaosinmotion.com/blog/?p=622

 http://en.wikipedia.org/wiki/Strategy_pattern

Dapple Hou

 mmonkeyer@163.com

SICP递归与迭代的本质:从阶乘斐波那契看计算过程形态 在计算机科学中,‘递归’与‘迭代’并非仅是语法差异,而是描述程序运行时控制流与资源消耗的根本范式。其核心在于理解‘计算过程’的形态——线性递归产生O(n)空间开销,尾递归可优化为O(1)空间的线性迭代,而朴素斐波那契则暴露出树形递归导致的指数级时间爆炸(O(φ^n))。这种差异直指增长阶(order of growth)这一工程关键概念:它剥离常数与低阶项,专注输入规模扩大时时间/空间的渐进变化规律。通过纸面推演调用树与状态表,开发者能建立对栈深度、变量演化和计算冗余的具身认知。本文以SICP经典案例为入口 阅读详情

相关推荐

Java实现阶乘计算的完整代码与优化方案

阶乘(Factorial)是定义在非负整数上的函数,记作 $ n!$,其数学表达式为:n!= n \times (n-1) \times (n-2) \times \cdots \times 1, \quad \text{其中 } n \in \mathbb{N}_0$$并特别规定 $ 0!= 1 $,这一约定符合空积(empty product)的数学惯例,确保组合公式在边界情况下依然成立。BigInteger是不可变的大整数类,位于java.math。

weixin_42466857的博客 1240

05年写的一个儿时玩的4子棋游戏

如看不到图片,请点击下面的链接 http://hi.baidu.com/dapplehou/blog/item/5ddafdfae8a860cfb58f31b3.html   儿时常和伙伴们玩下棋游戏,比如动物棋、两子棋、四子棋(我们叫这种棋为两个打一个)。后来学象棋,就不玩它们了,但能勾起特别多的对童年幸福时光的回忆。因为怀旧,就写了这样一个小游戏。 一开始,两军对垒: 如果自...

mmonkeyer的博客 897

ABAP ALV编辑后触发事件

1.FUNCTION ALV在it_events的参数中,写入对应的事件。2.OO ALV和FUNCTION ALV都可以,注册当前ALV的事件,对应的事件需要创建对象去实现。下面代码中,实现的是第一种,在it_events中写入事件。下面的代码是通过创建对象去实现ALV事件。

a86632678的博客 3852

Java 并发

并发 Table of Contents 1 什么是并发问题。 2 java中synchronized的用法 3 Java中的锁与排队上厕所。 4 何时释放锁? 5 Lock的使用 6 利用管道进行线程间通信 7 阻塞队列 8 使用Executors、Executor、ExecutorService、Thread...

mmonkeyer的博客 773

项目管理——14规划绩效域论文套路

规划绩效域论文套路

Flee Elf 1153

目前最新NIST随机数测试软件下载、安装、及使用教程

最近由于科研需要,在搞一些随机数的测试的事情,众所周知 随机数测试我们可以使用NIST的软件进行多大15项的随机测试,我也在网上查找了很多大牛的博客,但是都是年代久远,很多的链接现在都是物是人非,都是不能直接使用了,今天顺便抽点时间更新一下这个NIST软件的下载及使用。我们首先讲一下该软件的下载:1.我们直接取NIST的官网(https://csrc.nist.gov/)下载即可 ;链接如下:下载...

Miracle.Zhao的博客 3万+

阶乘的使用

阶乘(factorial)是基斯顿·卡曼(Christian Kramp, 1760 – 1826)于1808年发明的运算符号。阶乘,也是数学里的一种术语。    任何大于1的自然数n阶乘表示方法:   n!=1×2×3×……×n   或   n!=n×(n-1)!   n的双阶乘:   当n为奇数时表示不大于n的所有奇数的乘积   如:7!!=1×3×5×7  ...

longcxm1的博客 2312

论文超详细精读|万字:2s-AGCN

1. 提出了一种新的双流自适应图卷积网络(2S-AGCN)用于基于骨架的动作识别。**模型中的图的拓扑既可以统一地学习,也可以通过BP算法以端到端的方式单独学习。** 2. 提出了一种同时对**一阶和二阶信息(骨架的长度与方向)建模的双流框架**,在识别精度上有了显著的提高。 它将骨架数据的图结构参数化,并嵌入到网络中,与模型共同学习和更新。 3. 文章主要创新点有两个,一个是双流网络,另外一个是自适应。

IanYue的博客 6383

阶乘的由来

阶乘(factorial)是基斯顿·卡曼(Christian Kramp, 1760 – 1826)于1808年发明的运算符号. 阶乘(!) 转载于:https://www.cnblogs.com/dingcx/p/6677099.html

weixin_34414196的博客 880

本地如何安装midscene.js运行环境

手把手教你本地安装midscene.js运行环境

实践助梦想成长 2608

PlutoSDR在matlab中的环境配置(包括驱动和硬件支持包)

双击下载到的驱动,除了点击接受协议和设置安装路径,其他只要点击下一步或者安装即可。登录或者注册你的账号,选择你的matlab版本(这里我的是2023b),点击下一步。设置安装路径,并选择我接受,点击下一步,即可安装完成,并在安装路径中得到。完成后,打开设备管理器,在端口和通用串行总线设备一栏,即可看见下图。点击进入,选择相应的系统安装包,这里我选择的Windows。可看到我们要安装的Pluto支持包,安装即可。右击桌面matlab,选择打开文件所在位置。右上角搜索pluto,选择并点击下一步。

weixin_53160338的博客 4864

mysql的阶乘_从阶乘的实现的例子,一步一步看程序架构的演化。

工具类:public class FactorialUtil{private static FactorialUtil singleton;private FactorialAlgorithm algorithm;/*** Default (internal) constructor constructs our default algorithm.*/private FactorialUtil(...

weixin_28761343的博客 156

ROS入门(一)——ROS安装(vmware16+ubuntu20.04+ROS-Noetic)

嵌套:ROS可以在Ubuntu上运行,Ubuntu在虚拟机Vmware中安装。 从 虚拟机vmware安装→ubuntu安装→ros安装,逐步介绍安装ROS环境的过程。整个过程是我一步步跟着各种博客安装实现的,亲测可行。 版本: Vmware :Vmware Workstation16 Ubuntu :20.04 ROS :Noetic 其中vmware直接载当前最新版本就好,而ubuntu的版本要注意一下。 在ROS官网(cn - ROS Wiki),我们进入到ROS安装的步骤界面,可以看..

Netceor的博客 9740

mysql实现阶乘_从阶乘的实现的例子,一步一步看程序架构的演化。

工具类:public class FactorialUtil{private static FactorialUtil singleton;private FactorialAlgorithm algorithm;/*** Default (internal) constructor constructs our default algorithm.*/private FactorialUtil(...

weixin_35740588的博客 333

基于扣子3.0复刻MIT“AI股神团队版”:实时股票数据API接入与策略选股复盘系统

基于扣子3.0的AI量化投资系统摘要 本文提出了一种基于扣子(Coze)3.0平台的AI量化投资解决方案,整合实时股票数据与策略选股功能。系统采用三层架构: 数据层:通过AKShare等开源工具获取A股实时行情和历史K线数据,支持批量数据抓取和清洗 策略层:内置多因子选股模型和技术指标分析模块,实现自动化标的筛选 应用层:利用扣子3.0的插件和工作流功能,构建从数据采集到投资建议的完整流程 系统特点包括:完全开源的数据接入方案、Python实现的策略计算模块、以及扣子平台提供的可视化编排能力~~~~~~~~

huanghm88的专栏 264

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

递归算法原理详解及Python实现

文章目录摘要一、递归算法原理1、先举一个例子说明一下递归的作用2、递归算法的思想3、为什么递归难理解4、递归的应用场景二、几个典型问题的python实现1、计算阶乘2、汉诺塔问题3、斐波拉切数列问题 摘要 对新手而言,递归及其衍生的动态规划可以说是最难理解的几个算法。在看别人的代码的时候又会发现别人几行代码就用递归解决了一个难题,但让自己写却死活写不出来。 为什么会有这种反差呢?经过长时间的递归学...

weixin_45459911的博客 4291

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

斐波那契数列和递归求N阶乘(Java递归案例)

【辰兮要努力】:hello你好我是辰兮,很高兴你能来阅读,昵称是希望自己能不断精进,向着优秀程序员前行! 博客来源于项目以及编程中遇到的问题总结,偶尔会有读书分享,我会陆续更新Java前端、后台、数据库、项目案例等相关知识点总结,感谢你的阅读和关注,希望我的博客能帮助到更多的人,分享获取新知,大家一起进步! 吾等采石之人,应怀大教堂之心,愿你们奔赴在各自的热爱中… 一、斐波那契数列是常见的数学问题,也是常见的递归问题 斐波那契数列的是这样一个数列:1、1、2、3、5、8、13、21、34…,即第一.

末尾卡片和博主交流学习! 2806

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

深入理解constexpr递归(从C++11到C++20的深度演化)

掌握constexpr函数的递归深度控制技巧,提升编译期计算效率。详解从C++11到C++20中constexpr递归的演化过程,涵盖适用场景、限制突破与性能优化方法,实现更安全高效的元编程,值得收藏。

PixelGlow的博客 336

[数据结构]算法设计方法:递归的内涵与java实现n的阶乘

本博克部分代码来源:   本文原创作者:书呆子Rico   作者博客地址:http://blog.youkuaiyun.com/justloveyou/    摘要:   大师 L. Peter Deutsch 说过:To Iterate is Human, to Recurse, Divine.中文译为:人理解迭代,神理解递归。毋庸置疑地,递归确实是一个奇妙的思维方式。对一些简单的递归问题,我们总是惊叹于递...

一杯糖不加咖啡 1223

计算1!+2!+3!+...+n!,阶乘计算(简单版和优化版)

简单版 #include <stdio.h> int main() { int n; scanf("%d", &n); int sum = 0, ret = 1; for(int i = 1; i <= n; i++) { ret = 1;//注意这个地方 for(int j = 1; j <= i; j++) { ret = ret * j; }

HHHSSS7的博客 1018

递归专题 01篇——超经典递归算法原理和实现时的经验总结 (4)经典递归问题实战(面试常考)

目录一、引言3、上面的比喻形象地阐述了递归与循环的内涵,那么我们来思考以下几个问题:二、递归的原理和概念4、递归的三要素(极其重要)5、递归算法的编程模型6、递归的应用场景三. 递归与循环四. 经典递归问题实战第一类问题:问题的定义是按递归定义的(1). 阶乘(2). 斐波纳契数列(4). 回文字符串的判断(5). 字符串全排列(6). 二分查找第二类问题:问题解法按递归算法实现(1). 汉诺塔问...

博雅勇士的博客 1537

从混沌到秩序:Lisp家族的演化与ANSI标准化的必然

ANSI Common Lisp的成功在于其坚持了符号计算的第一性原理,通过标准化和正交性设计,为开发者提供了一个既灵活又稳定的编程平台。在快速变化的技术环境中,这种基于第一性原理的设计使得ANSI Common Lisp能够跨越时代,从AI的黄金时代到现代机器学习,始终保持着强大的生命力。对于现代开发者来说,学习ANSI Common Lisp不仅是掌握一种编程语言,更是理解符号计算的本质和第一性原理的思维方式。这种思维方式将帮助开发者在面对复杂问题时,能够回归本质,找到最优雅的解决方案。

AI天才研究院 1039

C语言的函数实现

函数是一个独立的代码块,它执行特定的任务。通过调用函数,可以执行业务逻辑,而无需重新书写相同的代码。在C语言中,函数由返回值类型、函数名称、参数列表和函数体组成。在C语言中,函数通常分为声明和定义两部分。函数声明用于告知编译器函数的名称、返回值类型和参数类型,而函数定义则包含了更为详细的实现。函数定义包含了实现的具体内容。c函数的声明和定义相辅相成。声明让编译器知道函数的接口,定义则提供了函数的具体实现。在C语言中,函数的声明和定义可以在不同的文件中,便于模块化编程和代码的组织。

2501_90416973的博客 473

(学习笔记)3.7 过程 (3.7.6 递归过程)

本文探讨了x86-64架构下递归调用的底层实现机制。分析表明,递归功能完全基于标准的过程调用机制实现,其中栈结构为每次调用提供独立的存储空间,保证局部变量互不干扰。通过递归阶乘函数rfact的汇编代码示例,详细展示了栈帧管理、寄存器保存(如%rbx)和参数传递等关键操作。文章还通过逆向分析练习题3.35中的rfun函数,说明如何从汇编代码还原递归逻辑。核心结论指出,递归作为一种高级抽象,其实现完全建立在简洁通用的底层机制之上,特别是栈的LIFO特性和寄存器管理约定共同确保了递归调用的正确性。

2302_78081749的博客 581

算法提升——递归算法(超详细,易于理解)

递归的定义 递归:     递归是运行过程中,自己调用自己的一种方法,并且一步步向前推进。 递归 递归函数   递归练习 基础的递归练习:    (1)数值阶乘的求解 a. 十三以内的数值阶乘的求解: 解决此题的主要思想:     递归实现十三以内的任意阶乘数,此题我们可以实现给定的数值n以前的并且包括n的所有阶乘; package arithmetic.recursion; import java.util.Scanner; public class Training1_求阶乘 { p

weixin_45619069的博客 888

SICP学习笔记及题解---构造过程抽象(二)

主要内容: 表达式,值,define l 过程的内部定义和块结构(上述示例已经解释) l 分析过程(静态,描述)产生的计算进程(动态,行为) l 计算进程的类型 Ø 线性递归 Ø 线性迭代 Ø 树形递归 l 计算的代价

[&] () {} 2290
上一篇: 05年写的一个儿时玩的4子棋游戏
mmonkeyer
博客等级 码龄23年 1粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值