Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: pann

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

Language: cpp

Time: 0.003 second

Submitted On: 2026-10-02 05:54:33

#include <iostream>
using namespace std;

int height(int x){
    if (x == 0) return 0;
    if (x == 1) return 4;
    return (x-2)*6 + height(x-1) + 10;
}
    
int main(){
    int t;
    cin >> t;
    cout << height(t);
    return 0;
}