結果

問題 No.554 recurrence formula
ユーザー mlihua09mlihua09
提出日時 2020-09-15 02:08:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 187 bytes
コンパイル時間 1,110 ms
コンパイル使用メモリ 86,520 KB
実行使用メモリ 79,824 KB
最終ジャッジ日時 2023-09-04 01:25:41
合計ジャッジ時間 7,518 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,908 KB
testcase_01 AC 75 ms
70,984 KB
testcase_02 WA -
testcase_03 AC 74 ms
70,796 KB
testcase_04 WA -
testcase_05 AC 76 ms
70,900 KB
testcase_06 WA -
testcase_07 AC 78 ms
71,032 KB
testcase_08 WA -
testcase_09 AC 76 ms
70,896 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 * x)

else:
    print(n * x)
0