提出 #33600877


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;

int main(void) {
  long long a, b, c;
  cin >> a >> b >> c;
  double ng = 1, ok = 2;
  for (int i = 0; i < 10000; i++) {
    double m = (ng + ok) / 2;
    double val = a * m * m * m * m * m + b * m + c;
    if (val < 0)
      ng = m;
    else
      ok = m;
  }
  cout << fixed << setprecision(9) << ok << endl;
  return 0;
}

提出情報

提出日時
問題 G - 方程式
ユーザ tunamagur0
言語 C++ (GCC 9.2.1)
得点 6
コード長 388 Byte
結果 AC
実行時間 6 ms
メモリ 3756 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 6 / 6
結果
AC × 2
AC × 29
セット名 テストケース
Sample example0.txt, example1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, example0.txt, example1.txt
ケース名 結果 実行時間 メモリ
000.txt AC 6 ms 3664 KiB
001.txt AC 2 ms 3668 KiB
002.txt AC 2 ms 3628 KiB
003.txt AC 2 ms 3708 KiB
004.txt AC 2 ms 3676 KiB
005.txt AC 4 ms 3740 KiB
006.txt AC 2 ms 3740 KiB
007.txt AC 3 ms 3628 KiB
008.txt AC 2 ms 3740 KiB
009.txt AC 2 ms 3756 KiB
010.txt AC 3 ms 3752 KiB
011.txt AC 2 ms 3728 KiB
012.txt AC 4 ms 3632 KiB
013.txt AC 2 ms 3548 KiB
014.txt AC 2 ms 3552 KiB
015.txt AC 2 ms 3736 KiB
016.txt AC 2 ms 3740 KiB
017.txt AC 2 ms 3656 KiB
018.txt AC 2 ms 3552 KiB
019.txt AC 2 ms 3720 KiB
020.txt AC 2 ms 3556 KiB
021.txt AC 2 ms 3704 KiB
022.txt AC 2 ms 3756 KiB
023.txt AC 2 ms 3756 KiB
024.txt AC 2 ms 3608 KiB
025.txt AC 2 ms 3652 KiB
026.txt AC 4 ms 3536 KiB
example0.txt AC 2 ms 3668 KiB
example1.txt AC 2 ms 3756 KiB