Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: Mocha_nb

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-25 18:03:34

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


int main(){
    int n,res = 0,k=4;
    cin >> n;
    for(int i=0;i<n;i++){
        if(i==0){
            res +=4;
            continue;
        }
        k += 6;
        res += k;
    }
    cout << res;
}