文章
34
粉丝
9
获赞
5
访问
8.9k
#include <iostream> using namespace std; int main(){ int n; cin >> n; while(n --){ int x; cin >> x; cout << x * x + (2 * x - 2 ) * (x - 1) / 2 << endl; } return 0; }
登录后发布评论
暂无评论,来抢沙发