Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: MrPian

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-11 10:54:53

#include <iostream>
using namespace std;
long long height_at_time(int t) {
	if (t == 0) {
		return 0;
	}
	return height_at_time(t - 1) + (6 * t - 2);
}

int main() {
	int t;
	if (!(cin >> t)) {
		return 0;
	}
	cout << height_at_time(t);
	return 0;
}