65502023-12-08 22:57:06mmatedFalfelújítás FalFöldöncpp17Accepted 100/1003ms3536 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n;
    cin>>n;
    cout<<n*n-(n-2)*(n-2)+n-2<<"\n";
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1888 KiB
2Accepted3ms2088 KiB
subtask220/20
3Accepted3ms2300 KiB
4Accepted3ms2508 KiB
5Accepted3ms2996 KiB
6Accepted3ms2952 KiB
subtask380/80
7Accepted3ms3180 KiB
8Accepted3ms3536 KiB
9Accepted3ms3388 KiB
10Accepted3ms3380 KiB
11Accepted3ms3512 KiB
12Accepted3ms3524 KiB
13Accepted3ms3524 KiB
14Accepted3ms3520 KiB
15Accepted2ms3528 KiB
16Accepted3ms3528 KiB