找规律。
1
1 3
1 3 5 7
1 3 5 7 9 11 13 15
.......
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi=acos(-1.0);
void File()
{
freopen("D:\\in.txt","r",stdin);
freopen("D:\\out.txt","w",stdout);
} const int maxn=;
LL a[maxn],b[maxn]; int main()
{
a[]=; b[]=;
for(int i=;i<=;i++) a[i]=*a[i-];
for(int i=;i<=;i++) b[i]=b[i-]+a[i];
LL n; while(~scanf("%lld",&n))
{
for(int i=;i<=;i++)
{
if(b[i]<=n) continue;
else
{
LL x=n-b[i-]; if(x==) x=a[i-];
printf("%lld\n",+(x-)*);
break;
}
}
}
return ;
}