一本通1100

//qf
#include<bits/stdc++.h>
#define f(i,j,n) for(register int i=j;i<=n;i++)
using namespace std;
signed main(){
	int n,c=0;
	unsigned long long s=0;
	cin>>n;
	f(i,1,n){
	    f(j,1,i){
		    c++,s+=i;
	        if(c==n) break;
	    } 
		if(c==n) break;
	}
	cout<<s<<endl;
	return 0;
}
posted @ 2019-04-12 21:58  Isaunoya  阅读(290)  评论(0编辑  收藏  举报
TOP