标签:blog io ar sp for div log bs ef
#include<stdio.h> int main() { int i,n; int s1,s2; while(scanf("%d",&n)!=EOF) { for(i=1;i<=100;i++) { s1=i*(i+1)*(i+2)/6; s2=(i+1)*(i+2)*(i+3)/6; if(n>=s1&&n<s2) { printf("%d\n",i); break; } } } }
标签:blog io ar sp for div log bs ef
原文地址:http://www.cnblogs.com/wuyuewoniu/p/4137166.html