1 2 3 4 5 6 7 8 9 10 11 12 13 | #include <stdio.h> int main() { int j, n,k; scanf("%d", &k); if (k >= 1 && k <= 1000) for (j = 0; j < k; j++) { scanf("%d", &n); printf("%d\n", (n * (3 * n + 1))/2); } return 0; } |
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewogICAgICAgIGludCBqLCBuLGs7CiAgICAgICAgc2NhbmYoIiVkIiwgJmspOwogICAgICAgIGlmIChrID49IDEgJiYgayA8PSAxMDAwKQogICAgICAgIGZvciAoaiA9IDA7IGogPCBrOyBqKyspIHsKICAgICAgICAgICAgICAgIHNjYW5mKCIlZCIsICZuKTsKICAgICAgICAgICAgICAgIHByaW50ZigiJWRcbiIsIChuICogKDMgKiBuICsgMSkpLzIpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gMDsKfQo=
-
upload with new input
-
result: Success time: 0.01s memory: 1724 kB returned value: 0
2 5 7
40 77
-
result: Success time: 0.01s memory: 1720 kB returned value: 0



