結果

問題 No.554 recurrence formula
ユーザー yamanchu3776yamanchu3776
提出日時 2017-08-23 12:30:33
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 198 bytes
コンパイル時間 724 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 21,376 KB
最終ジャッジ日時 2024-04-23 13:06:46
合計ジャッジ時間 4,481 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
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 #

import math
num = int(raw_input())


sn = []
sn.append(0)
sn.append(1)
for i in range( num-1 ):
	i = i+2
	ss = i*sn[-1] + sn[-2]
	sn.append(ss)

an = sn[-1] - sn[-3]

print sn
print an%1000000007


0