結果

問題 No.557 点対称
ユーザー Ribura
提出日時 2020-05-20 00:21:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-10-01 23:21:25
合計ジャッジ時間 2,247 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
mod = 10 ** 9 + 7
if n == 1:
    print(2)
else:
    print(4 * pow(5, n // 2 - 1, mod) * (3 if n % 2 == 1 else 1) % mod)
0