Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: Kidmaiok
Problemset: นักบินอวกาศ
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-11 14:03:34
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define space << ' '
#define nl << endl
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int arr[210] = {0};
for(int i =1; i <= n;i++){
arr[i] = arr[i-1] + 4 + (i-1)*6;
}
cout << arr[n];
}