• 请不要在回答技术问题时复制粘贴 AI 生成的内容
GoForce5500
V2EX  ›  程序员

关于 233 的程序员标准用法

  •  
  •   GoForce5500 · Oct 10, 2016 · 3837 views
    This topic created in 3503 days ago, the information mentioned may be changed or developed.

    简写: fib(13)

    全称: Fibonacci(13)

    证明: def fib(int:Int):Int = { int match { case x if x==0 => 0 case x if x==1 => 1 case x if x>1 => fib(x-1)+fib(x-2) } }

    println(fib(13))

    输出: 233

    1 replies    2016-10-10 11:18:00 +08:00
    QK8wAUi0yXBY1pT7
        1
    QK8wAUi0yXBY1pT7  
       Oct 10, 2016
    还以为是猫扑素数问题再现呢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3725 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 00:43 · PVG 08:43 · LAX 17:43 · JFK 20:43
    ♥ Do have faith in what you're doing.