#25677: 笑死 我ac


justinli (安茲 烏爾 恭)

School : 恆毅中學國中部
ID : 93947
IP address : [114.44.184.178]
Last Login :
2021-06-19 11:22:19
d096. 00913 - Joana and the Odd Numbers -- UVa913 | From: [114.44.182.98] | Post Date : 2021-06-11 15:40

#include<iostream>

using namespace std;

int main()

{

long long int n;

 

while( cin >> n ) cout << ( 3 * n * n + 6 * n + 3 ) / 2 - 9 << endl; 

 

return 0;

}

 
ZeroJudge Forum