結果

問題 No.787 Mice and Traitors(ネズミ達と裏切り者)
ユーザー 👑 emthrmemthrm
提出日時 2019-02-08 22:44:43
言語 C++17
(gcc 11.2.0 + boost 1.78.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 859 bytes
コンパイル時間 952 ms
使用メモリ 6,948 KB
最終ジャッジ日時 2023-02-01 16:56:37
合計ジャッジ時間 1,810 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
6,948 KB
testcase_01 AC 1 ms
4,908 KB
testcase_02 AC 1 ms
4,904 KB
testcase_03 AC 1 ms
4,908 KB
testcase_04 AC 1 ms
4,900 KB
testcase_05 AC 1 ms
4,904 KB
testcase_06 AC 2 ms
4,900 KB
testcase_07 AC 1 ms
4,904 KB
testcase_08 AC 1 ms
4,904 KB
testcase_09 AC 1 ms
4,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;

#define FOR(i,m,n) for(int i=(m);i<(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()

const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
/*----------------------------------------*/
int main() {
  // freopen("input.txt", "r", stdin);

  double p, q; cin >> p >> q;
  double r = p * q, tmp = r + (100 - p) * (100 - q);
  r /= tmp;
  r *= 100;
  printf("%.10f", r);
}
0