結果

問題 No.554 recurrence formula
ユーザー fagfagdfafagfagdfa
提出日時 2017-08-22 08:50:42
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 814,980 KB
最終ジャッジ日時 2024-04-23 04:38:21
合計ジャッジ時間 3,292 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,812 KB
testcase_01 AC 11 ms
6,940 KB
testcase_02 AC 11 ms
6,940 KB
testcase_03 AC 11 ms
6,940 KB
testcase_04 AC 11 ms
6,940 KB
testcase_05 AC 12 ms
6,940 KB
testcase_06 AC 11 ms
6,940 KB
testcase_07 AC 11 ms
6,944 KB
testcase_08 AC 11 ms
6,940 KB
testcase_09 AC 11 ms
6,944 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 MLE -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()

lis = [0 for i  in range(N + 1)]
lis[1] = 1
odd = 1
even = 0

for i in range(2, N + 1):
    if i % 2 == 0:
        lis[i] = i * odd
        even += lis[i]
    else:
        lis[i] = i * even
        odd += lis[i]

print lis[N]
0