結果

問題 No.554 recurrence formula
ユーザー momotaros300momotaros300
提出日時 2019-09-03 10:09:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 1,081 ms
コンパイル使用メモリ 86,844 KB
実行使用メモリ 83,984 KB
最終ジャッジ日時 2023-08-25 00:01:33
合計ジャッジ時間 8,765 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
71,236 KB
testcase_02 AC 70 ms
70,920 KB
testcase_03 AC 70 ms
71,140 KB
testcase_04 AC 71 ms
71,324 KB
testcase_05 AC 70 ms
71,348 KB
testcase_06 AC 70 ms
71,164 KB
testcase_07 AC 69 ms
71,324 KB
testcase_08 AC 69 ms
71,144 KB
testcase_09 AC 70 ms
71,372 KB
testcase_10 WA -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 TLE -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
mod=10**9+7
even,odd=0,1
for i in range(2,n):
	if i%2==0:
		even+=odd*i
		even%mod
	else:
		odd+=even*i
		odd%mod
print(even*n if n%2 else odd*n)





0