From b00528607b0a64256b29910af588778c8da2b089 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Thu, 27 Oct 2016 19:34:07 +0800 Subject: [PATCH] Create 1410.cpp --- QUSTOJ/1410.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 QUSTOJ/1410.cpp diff --git a/QUSTOJ/1410.cpp b/QUSTOJ/1410.cpp new file mode 100644 index 0000000..8f67422 --- /dev/null +++ b/QUSTOJ/1410.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +using namespace std; + +int main() +{ + int m,n; + scanf("%d",&n); + int ans=1; + m=2; + while(1) + { + int p=m*m*m; + if(ans+p<=n) + { + ans+=p; + m++; + continue; + } + else + { + break; + } + } + printf("%d\n",m-1); + return 0; +} + +/************************************************************** + Problem: 1410 + User: 1508080112 + Language: C++ + Result: 正确 + Time:4 ms + Memory:800 kb +****************************************************************/