結果
| 問題 |
No.2973 シュニレルマン積分入門
|
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2024-11-29 22:30:35 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 343 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2024-11-29 22:30:41 |
| 合計ジャッジ時間 | 5,763 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 20 |
ソースコード
import fractions
from functools import lru_cache
N=int(input())
@lru_cache(maxsize=None)
def A(N):
if N==0:
return fractions.Fraction(1)
if N==1:
return fractions.Fraction(1)
if N>0:
return A(N-1)-10*A(N-2)
else:
return (A(N+1)-A(N+2))/10
ans=-A(N-2)
print(ans.numerator,ans.denominator,sep="/")
vwxyz