結果

問題 No.554 recurrence formula
ユーザー yamanchu3776yamanchu3776
提出日時 2017-08-23 12:36:48
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 167 bytes
コンパイル時間 54 ms
コンパイル使用メモリ 6,724 KB
実行使用メモリ 13,904 KB
最終ジャッジ日時 2023-08-05 15:55:50
合計ジャッジ時間 4,442 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
13,168 KB
testcase_01 AC 12 ms
5,988 KB
testcase_02 AC 11 ms
6,028 KB
testcase_03 AC 11 ms
6,000 KB
testcase_04 AC 11 ms
5,872 KB
testcase_05 AC 11 ms
5,912 KB
testcase_06 AC 11 ms
6,028 KB
testcase_07 AC 11 ms
6,000 KB
testcase_08 AC 11 ms
5,868 KB
testcase_09 AC 11 ms
5,980 KB
testcase_10 AC 13 ms
5,968 KB
testcase_11 AC 23 ms
6,156 KB
testcase_12 AC 20 ms
6,064 KB
testcase_13 AC 47 ms
6,212 KB
testcase_14 AC 23 ms
6,152 KB
testcase_15 AC 54 ms
6,268 KB
testcase_16 AC 63 ms
6,308 KB
testcase_17 AC 36 ms
6,200 KB
testcase_18 AC 32 ms
6,200 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