Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: pitt
Problemset: นักบินอวกาศ
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-01 12:50:10
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t, h = 0;
cin >> t;
for (int i = 0; i <= t; i++)
{
if (i > 0)
{
if (i == 1)
{
h += 4;
}
else
{
h += 4 + (6 * (i - 1));
}
}
//cout << h << endl;
}
cout << h;
}