結果
| 問題 | No.2469 Umbrella Queries |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2023-09-20 16:53:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 2,000 ms |
| コード長 | 437 bytes |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 40,644 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 11:55:40 |
| 合計ジャッジ時間 | 1,017 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 |
ソースコード
/* -*- 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;
}
tnakao0123