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;
}
全站熱搜
留言列表