結果
| 問題 |
No.2461 一点張り
|
| コンテスト | |
| ユーザー |
a01sa01to
|
| 提出日時 | 2024-05-15 00:48:49 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 506 bytes |
| コンパイル時間 | 3,434 ms |
| コンパイル使用メモリ | 244,440 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-20 10:07:16 |
| 合計ジャッジ時間 | 4,037 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "settings/debug.cpp"
#define _GLIBCXX_DEBUG
#else
#define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
int t;
cin >> t;
cout << fixed << setprecision(15);
while (t--) {
double p;
int k;
cin >> p >> k;
if (p == 0)
cout << k << endl;
else
cout << (1 - pow(1 - p, k)) / p << endl;
}
return 0;
}
a01sa01to