close

https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=854

 

#include <stdio.h>

#include <assert.h>

 

int main() {

    unsigned long long N;

    while (scanf("%llu", &N) == 1) {

        N = (N + 1) * (N + 1) * 3 / 2 - 9;

        printf("%llu\n", N);

    }

    return 0;

}

arrow
arrow
    全站熱搜

    楓綺 發表在 痞客邦 留言(0) 人氣()