結果

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

テストケース

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

ソースコード

diff #

num = int(raw_input())
s1 = 0
s2 = 1
for i in range(num-1):
	i = i+2
	ss = i*s2 + s1
	s1 = s2
	s2 = ss

if num==1:
	print 1
else:
	an = num * s1
	print an%1000000007

0