Codeforces Round #328 (Div. 2) B. The Monster and the Squirrel

这题就是找规律,把3-7的答案画出来,然后去找规律,就行了。answer=(n-2)*(n-2);

#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define LL long long
int main()
{
    LL n;
    while(scanf("%lld",&n)!=EOF)
    {
        printf("%lld\n",(n-2)*(n-2));
    }
    return 0;
}


你可能感兴趣的:(Codeforces Round #328 (Div. 2) B. The Monster and the Squirrel)