結果
| 問題 |
No.1274 楽しい格子点
|
| コンテスト | |
| ユーザー |
cureskol
|
| 提出日時 | 2022-11-16 12:39:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 433 bytes |
| コンパイル時間 | 110 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2024-09-17 09:35:24 |
| 合計ジャッジ時間 | 3,139 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 50 WA * 7 |
ソースコード
import math
A,B=map(int,input().split())
if A<0:A=-A
if B<0:B=-B
G=math.gcd(A,B)
if A==0 and B==0:
print(0.25)
exit(0)
if A==B:
ans=0
for n in range(10000):
x=n+1
y=2+2*n*G
if y>1000000:break
y=pow(y,y)
ans+=x/y
if x/y < 0.0000000001:break
print(ans)
exit(0)
ans=0
for n in range(10000):
x=n+1
y=2+n*G
if y>1000000:break
y=pow(y,y)
ans+=x/y
if x/y < 0.0000000001:break
print(ans)
cureskol