結果

問題 No.554 recurrence formula
ユーザー mlihua09mlihua09
提出日時 2020-09-14 23:35:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 188 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 247,732 KB
最終ジャッジ日時 2023-09-04 00:53:00
合計ジャッジ時間 6,877 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 74 ms
71,396 KB
testcase_02 AC 73 ms
71,388 KB
testcase_03 AC 73 ms
71,044 KB
testcase_04 AC 73 ms
71,196 KB
testcase_05 AC 71 ms
71,192 KB
testcase_06 AC 73 ms
71,240 KB
testcase_07 AC 73 ms
71,412 KB
testcase_08 AC 73 ms
71,348 KB
testcase_09 AC 75 ms
71,444 KB
testcase_10 WA -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 TLE -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

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