結果

問題 No.1274 楽しい格子点
ユーザー 👑 Kazun
提出日時 2020-10-31 00:44:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 216 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 528 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 77,440 KB
最終ジャッジ日時 2024-07-22 18:42:48
合計ジャッジ時間 3,464 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 57
権限があれば一括ダウンロードができます

ソースコード

diff #

import math;A,B=map(int,input().split())
if A|B==0:print(1/4);exit()
g=math.gcd(A,B);X=0;k=8*(g<=9)+2;F=A//g%2*B//g%2+1
while k+1:h=F*k*g+2;X+=(F*k+1)/h**h;k-=1
print(X)
0