結果
| 問題 |
No.1274 楽しい格子点
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 16:25:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 459 bytes |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 82,448 KB |
| 実行使用メモリ | 54,352 KB |
| 最終ジャッジ日時 | 2025-06-12 16:26:17 |
| 合計ジャッジ時間 | 3,691 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 57 |
ソースコード
def main():
import sys
A, B = map(int, sys.stdin.readline().split())
d = A + B
if d == 0:
print("1.0000000000000000")
return
sum_total = 0.0
s = 2
sum_total += 1.0 / (s ** s)
k = 1
while True:
s = 2 + 3 * k
term = 2.0 / (s ** s)
sum_total += term
if term < 1e-20:
break
k += 1
print("{0:.20f}".format(sum_total))
if __name__ == "__main__":
main()
gew1fw