• 非常好!但有两处可改进的地方:

    1. 可以将 q 定义为一个字符串,在使用 q[r] 时,返回的是字符串中下标为 r 的字符,跟访问序列的效果是一样的。这样可以少敲一些代码:
            q := “0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    1. 我们还可以将 q 定义在循环外,这样不用每次在循环中重新初始化一次 q,节省一些程序的执行时间。
    Edited by Vincent Wei
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment