結果
| 問題 | No.8108 徐々におかしくなる数学クイズ |
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2023-12-31 19:08:13 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| 記録 | |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 84,972 KB |
| 実行使用メモリ | 85,040 KB |
| 最終ジャッジ日時 | 2026-04-14 11:17:08 |
| 合計ジャッジ時間 | 1,973 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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