結果

問題 No.1274 楽しい格子点
ユーザー cureskol
提出日時 2022-11-16 11:24:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 197 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,388 KB
最終ジャッジ日時 2024-09-17 08:32:07
合計ジャッジ時間 3,204 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 49 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

A,B=map(int,input().split())

if A<0:A=-A
if B<0:B=-B
G=math.gcd(A,B)

ans=0
for n in range(10000):
  x=n+1
  y=2+n*G
  y=pow(y,y)
  ans+=x/y
  if x/y < 0.0000000001:break

print(ans)
0