結果

問題 No.554 recurrence formula
ユーザー mlihua09mlihua09
提出日時 2020-09-15 02:08:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 187 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 81,972 KB
実行使用メモリ 155,820 KB
最終ジャッジ日時 2024-06-22 01:28:13
合計ジャッジ時間 5,129 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 5 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 * x)

else:
    print(n * x)
0