結果

問題 No.2469 Umbrella Queries
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-10-02 17:20:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 460 bytes
コンパイル時間 765 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 77,260 KB
最終ジャッジ日時 2023-09-17 19:30:02
合計ジャッジ時間 1,847 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

"""

Umbrella Queries(2) 想定解

奇数の時は0
偶数の時は、円周角の定理を考えると直径+1点の組み合わせが答えとなる。

"""

import sys
from sys import stdin

T = int(stdin.readline())

#制約チェック
assert 1 <= T <= 10**5

for lp in range(T):
    
    N = int(stdin.readline())
    
    #制約チェック
    assert 3 <= N <= 10**9
    
    if N % 2 == 1:
        print (0)
    else:
        print ((N//2) * (N-2))
0