結果

問題 No.456 Millions of Submits!
ユーザー nebukuro09nebukuro09
提出日時 2016-12-08 09:40:28
言語 D
(dmd 2.106.1)
結果
WA  
実行時間 -
コード長 733 bytes
コンパイル時間 2,121 ms
コンパイル使用メモリ 159,252 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-09-02 23:23:09
合計ジャッジ時間 9,764 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.d(19): Deprecation: use `{ }` for an empty statement, not `;`

ソースコード

diff #

import std.stdio;
import std.array;
import std.string;
import std.conv;
import std.algorithm;
import std.typecons;
import std.range;
import std.random;
import std.math;
import std.container;
import std.numeric;
import core.bitop;


void main() {
  auto M = readln.chomp.to!int;
  foreach (_; 0..M) {
    auto s = readln.split;
    auto a = s[0].to!int;;
    auto b = s[1].to!int;
    auto t = s[2].to!real;
    if (a == 0) 
      writefln("%.10f", E^^t);
    else {
      real high = 100;
      real low = 1L;
      foreach (i; 0..50) {
        auto mid = (high + low) / 2.0L;
        if (pow(mid, a) * pow(log(mid), b) >= t)
          high = mid;
        else
          low = mid;
      }
      writefln("%.10f", high);
    }
  }
}
0