結果
| 問題 |
No.8108 徐々におかしくなる数学クイズ
|
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2023-12-31 19:08:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 82,156 KB |
| 実行使用メモリ | 80,724 KB |
| 最終ジャッジ日時 | 2024-09-27 17:11:01 |
| 合計ジャッジ時間 | 2,177 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
ソースコード
# WA(?)
import sys
from decimal import Decimal, ROUND_HALF_UP
dec = Decimal
input = sys.stdin.readline
MOD = 998244353
def get_fib(n):
r5 = dec(5) ** dec(0.5)
d1, d2 = dec(1), dec(2)
return int(d1 / r5 * (((d1 + r5) / d2) ** n - ((d1 - r5) / d2) ** n) + dec(0.1)) % MOD
print(get_fib(dec(input())))
MasKoaTS