結果
問題 | No.1824 門\松\列 |
ユーザー | MasKoaTS |
提出日時 | 2022-01-28 21:43:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 228 ms / 2,000 ms |
コード長 | 747 bytes |
コンパイル時間 | 1,422 ms |
コンパイル使用メモリ | 87,156 KB |
実行使用メモリ | 84,444 KB |
最終ジャッジ日時 | 2023-08-28 19:34:49 |
合計ジャッジ時間 | 2,383 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 217 ms
83,116 KB |
testcase_01 | AC | 212 ms
83,044 KB |
testcase_02 | AC | 228 ms
83,732 KB |
testcase_03 | AC | 226 ms
84,444 KB |
testcase_04 | AC | 218 ms
83,728 KB |
ソースコード
import itertools as iter import collections as coll import heapq as hq import bisect as bis from decimal import Decimal as dec from copy import deepcopy as dcopy import math import sys sys.setrecursionlimit(10**6) def input(): return sys.stdin.readline().rstrip() def getN(): return int(sys.stdin.readline()) def getNs(): return map(int,sys.stdin.readline().split()) def getList(): return list(map(int,sys.stdin.readline().split())) def strinps(n): return [sys.stdin.readline().rstrip() for _ in range(n)] pi = 3.141592653589793 mod = 10**9+7 MOD = 998244353 INF = math.inf dx = [1,0,-1,0]; dy = [0,1,0,-1] """ Main Code """ for _ in [0] * getN(): n = getN() print((n * (n + 1) * (2 * n + 1) // 6 - n * (n + 1) * 3 // 2 + 2 * n) * 2)