From e862efa6c7e10e83ee4208689ac8fa9df3176223 Mon Sep 17 00:00:00 2001 From: James <1943357252@qq.com> Date: Fri, 24 Apr 2020 13:51:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1659_n!/main.cpp | 2 +- 1659_n!/main.exe | Bin 76344 -> 76344 bytes 1659_n!/test/out.txt | 12 ++++++------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/1659_n!/main.cpp b/1659_n!/main.cpp index 12a3924..4a1d20b 100644 --- a/1659_n!/main.cpp +++ b/1659_n!/main.cpp @@ -5,7 +5,7 @@ long long dg(long long n){ if(n==1){ return 1; } - return n+dg(n-1); + return n*dg(n-1); } int main() { diff --git a/1659_n!/main.exe b/1659_n!/main.exe index 83e53388d8626b7548d8c7c3fa87b5a95f0e8fcf..25b94ccd8521046f5f7b97a53abe94150ed7b2bc 100644 GIT binary patch delta 24 gcmdmSg=NPTmI)n9hP4yB{FuxyG~U{Ji!n|U0E^oS%>V!Z delta 24 gcmdmSg=NPTmI)n9<~0+${FrRdH{RNMi!n|U0E|@%*8l(j diff --git a/1659_n!/test/out.txt b/1659_n!/test/out.txt index f258e61..dc56ad5 100644 --- a/1659_n!/test/out.txt +++ b/1659_n!/test/out.txt @@ -1,18 +1,18 @@ ## z:\Chao\src\1659_n!\test\in.txt -2020/04/24 周五 13:42:16.59 +2020/04/24 周五 13:46:26.28 1 ----------------------------------------------- -Process exited after 190 ms with return value 0 +Process exited after 140 ms with return value 0 ## z:\Chao\src\1659_n!\test\in2.txt -2020/04/24 周五 13:42:16.59 +2020/04/24 周五 13:46:26.28 1307674368000 ----------------------------------------------- -Process exited after 100 ms with return value 0 +Process exited after 90 ms with return value 0 ## z:\Chao\src\1659_n!\test\in3.txt -2020/04/24 周五 13:42:16.59 +2020/04/24 周五 13:46:26.28 24 ----------------------------------------------- -Process exited after 110 ms with return value 0 +Process exited after 180 ms with return value 0