course_1/README.md
2025-11-20 16:07:50 +08:00

6 lines
465 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 第一次 rust 语言作业
1. 计算 1 到 1000000 的根号的倒数的和。
2. 让用户输入一串字符,然后去除头尾的空格和换行符(请看看 trim 这个函数),然后计算去除后的长度。
3. 完美数是指其所有真因子(除了它本身之外的约数)之和恰好等于它本身的正整数。例如,第一个完美数是 6因为它的真因子 1、2 和 3 相加等于 6。找到 1 万以下的所有完美数。