09/01/06 00:19:31
>>232
int func_for(int n) {
int i;for(i=1;i<=100;i++) if(i*i+i >= 2*n) return i; return -1;
}
int func_while(int n) {
int i=0; while(++i<=100) if(i*i+i >= 2*n) return i; return -1;
}
main() {
int i,ans;scanf("%d",&i);ans = func_for(i);if(ans>=0) printf("answer = %d\n",ans); else printf("not found\n");
}