题目描述
传送门
题解
这道题貌似画个图就明白了
代码
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
int n;
scanf(
"%d",&n);
if (n&
1)
printf(
"%d\n",n/
2);
else printf(
"%d\n",n/
2-
1);
}
转载请注明原文地址: https://www.6miu.com/read-10964.html