結果
| 問題 |
No.1278 どんな級数?
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 20:47:59 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 390 bytes |
| コンパイル時間 | 241 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2025-06-12 20:50:02 |
| 合計ジャッジ時間 | 4,138 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 36 WA * 27 |
ソースコード
import sys
def main():
X, K = map(int, sys.stdin.readline().split())
if X == 1:
result = (0.75) ** K
else:
if K == 1:
result = 0.5
elif K == 2:
result = 0.644934033
else:
# For larger K, the sum approaches 1.0
result = 1.0
print("{0:.9f}".format(result))
if __name__ == "__main__":
main()
gew1fw