A - Vanya and Cubes
来源:互联网 发布:怎么修复u盘里的数据 编辑:程序博客网 时间:2024/06/11 01:49
#include <iostream>#include <string.h>#include <stdio.h>#include <cmath>#include <stdlib.h>using namespace std;int main(){ int n; while(scanf("%d",&n) != EOF) { if( n == 1) { printf("1\n"); continue; } int cnt = 2; int ans = 1; int now = 1; int res = 1; while( ans < n) { now += cnt++; ans += now; res++; } if(ans == n) printf("%d\n",res); else printf("%d\n",res-1); } return 0;}
0 0
- A. Vanya and Cubes
- A - Vanya and Cubes
- 492A - Vanya and Cubes
- 492A - Vanya and Cubes
- Codefroces 280 div2 A. Vanya and Cubes
- Codeforces 492A. Vanya and Cubes 水
- Codeforces 492A Vanya and Cubes(水)
- CodeForces 492A Vanya and Cubes
- CF 280A. Vanya and Cubes(div2)
- Codeforces 492A Vanya and Cubes【水题】
- Vanya and Cubes
- Codeforces Vanya and Cubes
- CodeForces 492A Vanya and Cubes(水题)
- codeforces——492A——Vanya and Cubes
- Codeforces Round #280 (Div. 2)---A. Vanya and Cubes (规律 + 暴力)
- Codeforces Round #280 (Div. 2)A. Vanya and Cubes(简单计算)
- A. Vanya and Cards
- A. Vanya and Cards
- 常用降维方法
- Haskell 与 Applicative Functor
- oracle 11g 64位连接32位PLSQL的方法
- B - Vanya and Lanterns
- 解决goagent上传时can’t set attribute错误
- A - Vanya and Cubes
- spring error: XML中${}如果丢失括号部分,不会报错
- 成佩涛的微博
- 【leetcode】Generate Parentheses 算法解析
- Java Sax解析XML
- [Android]仿微信开关按钮:)扁平化简洁风
- sudo命令使用
- SDUT ACM 2013级选拔赛(部分题目)
- JAVA DOM解析XML