結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 OLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
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
0