結果

問題 No.1824 門\松\列
ユーザー 👑 tamatotamato
提出日時 2022-01-28 21:33:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 731 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 76,876 KB
最終ジャッジ日時 2023-08-28 19:17:25
合計ジャッジ時間 1,359 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,456 KB
testcase_01 AC 69 ms
71,308 KB
testcase_02 AC 76 ms
75,532 KB
testcase_03 AC 82 ms
76,876 KB
testcase_04 AC 77 ms
75,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    for _ in range(int(input())):
        N = int(input())
        print((N * (N - 1) * (2 * N - 1) // 6 - N * (N - 1) // 2) * 2)


if __name__ == '__main__':
    main()
0