結果

問題 No.1136 Four Points Tour
ユーザー zaki_chemtechzaki_chemtech
提出日時 2020-07-30 15:51:37
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 145 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 85,616 KB
最終ジャッジ日時 2023-09-17 05:16:42
合計ジャッジ時間 4,406 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,148 KB
testcase_01 AC 70 ms
71,196 KB
testcase_02 AC 63 ms
70,892 KB
testcase_03 AC 64 ms
71,052 KB
testcase_04 AC 68 ms
71,232 KB
testcase_05 RE -
testcase_06 AC 61 ms
71,104 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
01_Sample03_evil.txt -- -
04_Rnd_large_evil1.txt -- -
04_Rnd_large_evil2.txt -- -
04_Rnd_large_evil3.txt -- -
04_Rnd_large_evil4.txt -- -
04_Rnd_large_evil5.txt -- -
04_Rnd_large_evil6.txt -- -
04_Rnd_large_evil7.txt -- -
04_Rnd_large_evil8.txt -- -
04_Rnd_large_evil9.txt -- -
04_Rnd_large_evil10.txt -- -
05_Rnd_huge_evil1.txt -- -
05_Rnd_huge_evil2.txt -- -
05_Rnd_huge_evil3.txt -- -
05_Rnd_huge_evil4.txt -- -
05_Rnd_huge_evil5.txt -- -
05_Rnd_huge_evil6.txt -- -
05_Rnd_huge_evil7.txt -- -
99_evil_01.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007

n=int(input())

ans = [0]*(n)

ans[0] = 1

ans[1] = 3

for i in range(2 ,n):
    ans[i] = (3**(i)-ans[i-1])%mod

print(ans[-1])
0