From bbb8c374ae6c4e609063fbf5f2faebe71190319b Mon Sep 17 00:00:00 2001 From: tursom <33368546+tursom@users.noreply.github.com> Date: Thu, 15 Feb 2018 20:43:21 +0800 Subject: [PATCH] Update main.c --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index be5f6de..b959012 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,6 @@ /* * 计算某个值一下的所有质数的程序 - * 时间复杂度为 Θ(n*√(n/ln(n))) + * 时间复杂度为 O(n*ln(n)) */ #include @@ -155,6 +155,9 @@ int main(int argc, char *argv[]) { for (int i = 0; i < numbers; i++) printf("%u\n", buff[i]); printf("%u numbers\n", numbers); + + //释放内存 + free(buff) return 0; -} \ No newline at end of file +}