結果

問題 No.554 recurrence formula
ユーザー mlihua09
提出日時 2020-09-14 23:35:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 188 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 82,528 KB
実行使用メモリ 270,604 KB
最終ジャッジ日時 2024-06-22 01:01:10
合計ジャッジ時間 4,848 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 2 RE * 8 TLE * 1 -- * 1
権限があれば一括ダウンロードができます

ソースコード

diff #


n = int(input())

mod = 10 ** 9 + 7

x = 1
y = 0
for i in range(2, n - 1, 2):
    y += i * x
    x += (i + 1) * y

if n % 2:
    y += (n - 1) * x
    print(n * y)

else:
    print(n * x)
0