hdu 2050 折线分割平面

训练递推用题,第一次做这个题,蒙的,而且对了。

#include <stdio.h>
int main(void)
{
    int c,a;
    scanf("%d",&c);
    while(c--)
    {
        scanf("%d",&a);
        printf("%d
",a*(a-1)*2+a+1);
    }
    return 0;
}

  

原文地址:https://www.cnblogs.com/A--Q/p/5697429.html