Contents Problem 中文網址 Solution 如下。 Code UVa 913 12345678910111213 int () { long long n, i, sum; while (scanf("%lld", &n) != EOF) { i = (1 + n)*(n / 2 + 1) / 2; sum = 3 * (1 + 2 * (i - 2));//最後 3 個相加 = 中間那個 * 3 printf("%lldn", sum); } return 0;} 赞微海报分享
近期评论