Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: helloskibidi

Problemset: นักบินอวกาศ

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-05 10:58:57

#include <bits/stdc++.h>
using namespace std;

long long dp[205] , a[205];

int main(){
    int n;
    cin >> n;
    a[0] = 0;
    a[1] = 4;
    dp[0] = 0;
    dp[1] = 4;
    for(int i=2;i<=200;i++){
        a[i] = a[i-1] + 6;
        dp[i] = dp[i-1] + a[i];
    }

    cout << dp[n];
}