Hello World


Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

hexo new "My New Post"

More info: Writing

Run server

$ hexo server

More info: Server

Generate static files

$ hexo generate

More info: Generating

Deploy to remote sites

$ hexo deploy

More info: Deployment

Create a code block

def fibonacci(n):
  """
  计算斐波那契数列的第n个数。

  参数:
    n: 一个非负整数,表示要计算的斐波那契数的位置。

  返回值:
    斐波那契数列的第n个数。
  """
  if n <= 1:
    return n
  else:
    a, b = 0, 1
    for _ in range(2, n + 1):
      a, b = b, a + b
    return b

# 示例:计算斐波那契数列的前10个数
for i in range(10):
  print(f"斐波那契({i}) = {fibonacci(i)}")

文章作者: ZST
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 ZST !
  目录