結果
| 問題 | No.53 悪の漸化式 |
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2021-08-15 00:54:34 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 28 ms / 5,000 ms |
| + 594µs | |
| コード長 | 559 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2026-09-10 23:23:52 |
| 合計ジャッジ時間 | 2,296 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
import bisect
import copy
import decimal
import fractions
import heapq
import itertools
import math
import random
import sys
from collections import deque,defaultdict
from functools import lru_cache,reduce
from heapq import heappush,heappop,heapify,_heappop_max,_heapify_max
def _heappush_max(heap,item):
heap.append(item)
heapq._siftdown_max(heap,0,len(heap)-1)
from math import gcd as Gcd
read=sys.stdin.read
readline=sys.stdin.readline
readlines=sys.stdin.readlines
N=int(readline())
if N==0:
ans=4
else:
ans=pow(3,N)/pow(4,N-1)
print(ans)
vwxyz