結果
問題 |
No.1274 楽しい格子点
|
ユーザー |
![]() |
提出日時 | 2020-10-30 22:15:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 400 bytes |
コンパイル時間 | 1,325 ms |
コンパイル使用メモリ | 166,292 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 01:02:52 |
合計ジャッジ時間 | 2,763 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 49 WA * 7 RE * 1 |
ソースコード
/** * @FileName a.cpp * @Author kanpurin * @Created 2020.10.30 22:15:35 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { ll a,b;cin >> a >> b; a = abs(a); b = abs(b); ll g = __gcd(a,b); double ans = 0; for (int i = 0; i <= 10/g; i++) { ans += 1.0/pow(i*g+2,i*g+2)*(i+1); } printf("%.10f\n",ans); return 0; }