結果

問題 No.2469 Umbrella Queries
ユーザー tnakao0123tnakao0123
提出日時 2023-09-20 16:53:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 437 bytes
コンパイル時間 1,642 ms
コンパイル使用メモリ 40,184 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-20 16:53:24
合計ジャッジ時間 1,280 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 25 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 2469.cc:  No.2469 Umbrella Queries - yukicoder
 */

#include<cstdio>
#include<algorithm>
 
using namespace std;

/* constant */

/* typedef */

typedef long long ll;

/* global variables */

/* subroutines */

/* main */

int main() {
  int tn;
  scanf("%d", &tn);

  while (tn--) {
    int n;
    scanf("%d", &n);

    ll x = (n & 1) ? 0 : (ll)(n / 2 - 1) * n;
    printf("%lld\n", x);
  }

  return 0;
}
0