1 #include<stdio.h>
2 #include<string.h>
3 inline void scan(int &x){
4 char ch;
5 while(ch=getchar(),ch<'0'||ch>'9');x=ch-'0';
6 while(ch=getchar(),ch>='0'&&ch<='9')x=10*x+ch-'0';
7 }
8 int main(){
9 #ifndef ONLINE_JUDGE
10 freopen("in.txt","r",stdin);
11 #endif
12 int t;
13 scan(t);
14 while(t--){
15 int num;
16 scan(num);
17 printf("%d\n",2+num*(num-1)*3);
18 }
19 return 0;
20 }
posted on 2012-05-16 00:08
Leo.W 阅读(106)
评论(0) 编辑 收藏 引用