~cpp
#include<stdio.h>
void sum(){
	int n=0,sum=0;

	while(1){
		n++;
		if(sum>=3000){
			break;
		}
		sum+=n;
	}
	printf("n=%d sum=%d\n",n,sum);
}	
int main(){
	sum();
	return 0;
}
- 그냥 메인을 줄여보고싶다는생각이..
----
최소정수의합
Retrieved from http://wiki.zeropage.org/wiki.php/최소정수의합/이태양
last modified 2021-02-07 05:31:17