Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: Jame007
Problemset: นักบินอวกาศ
Language: cpp
Time: 0.002 second
Submitted On: 2026-09-28 19:10:53
#include <bits/stdc++.h>
using namespace std;
int main(){
map<int,int> da ;
da[0] = 0;
da[1] = 4;
da[2] = 14;
int d = 0;
int t;
cin >>t;
if(t>2){
for(int i=0;i<t-2;i++){
d = da[2] - da[1] + 6*(i+1);
da[3+i] = d+da[2+i];
}
}
for (auto i:da){
if(i.first == t){
cout << i.second;
}
}
return 0;
}