結果
| 問題 |
No.1274 楽しい格子点
|
| コンテスト | |
| ユーザー |
cureskol
|
| 提出日時 | 2022-11-16 12:34:49 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 290 bytes |
| コンパイル時間 | 78 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-09-17 09:31:38 |
| 合計ジャッジ時間 | 3,044 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) ans=0 for n in range(10000): if A==B and n%2==1:continue 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