結果
| 問題 |
No.557 点対称
|
| ユーザー |
maspy
|
| 提出日時 | 2020-02-05 10:02:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 332 bytes |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-22 04:50:02 |
| 合計ジャッジ時間 | 2,145 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(read())
MOD = 10**9 + 7
def f(N):
if N == 1:
return 2
n = N // 2
x = pow(5, n-1, MOD) * 4
if N & 1:
x *= 3
return x % MOD
# f(2), f(3), f(57), f(864), f(1)
print(f(N))
maspy