結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー 👑 kakel-sankakel-san
提出日時 2022-06-17 22:35:53
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 701 ms / 3,000 ms
コード長 872 bytes
コンパイル時間 2,325 ms
コンパイル使用メモリ 57,824 KB
実行使用メモリ 35,656 KB
最終ジャッジ日時 2023-07-30 13:40:41
合計ジャッジ時間 20,732 ms
ジャッジサーバーID
(参考情報)
judge13 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
16,240 KB
testcase_01 AC 181 ms
21,152 KB
testcase_02 AC 513 ms
24,440 KB
testcase_03 AC 380 ms
23,164 KB
testcase_04 AC 151 ms
20,676 KB
testcase_05 AC 463 ms
24,060 KB
testcase_06 AC 685 ms
26,244 KB
testcase_07 AC 688 ms
26,364 KB
testcase_08 AC 693 ms
26,312 KB
testcase_09 AC 685 ms
26,316 KB
testcase_10 AC 690 ms
26,224 KB
testcase_11 AC 689 ms
26,212 KB
testcase_12 AC 685 ms
26,208 KB
testcase_13 AC 685 ms
26,304 KB
testcase_14 AC 685 ms
26,244 KB
testcase_15 AC 690 ms
26,304 KB
testcase_16 AC 701 ms
35,568 KB
testcase_17 AC 692 ms
35,580 KB
testcase_18 AC 694 ms
33,480 KB
testcase_19 AC 694 ms
33,536 KB
testcase_20 AC 694 ms
35,656 KB
testcase_21 AC 691 ms
33,572 KB
testcase_22 AC 695 ms
35,508 KB
testcase_23 AC 693 ms
35,572 KB
testcase_24 AC 701 ms
35,560 KB
testcase_25 AC 696 ms
35,508 KB
testcase_26 AC 72 ms
22,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static long[] NList => ReadLine().Split().Select(r => long.Parse(r.Replace(".", ""))).ToArray();
    static void Main()
    {
        var t = NN;
        var res = new long[t];
        for (var u = 0; u < t; ++u)
        {
            var c = NList;
            var (T, m, L) = (c[0], c[1], c[2]);
            var ng = 1836001L;
            var ok = 0L;
            while (ng - ok > 1)
            {
                var v = (ok + ng) / 2;
                if (25 * v * v + 18 * m * v * T <= 6480 * m * L) ok = v;
                else ng = v;
            }
            res[u] = ok;
        }
        WriteLine(string.Join("\n", res.Select(r => $"{r / 100}.{r % 100 :00}")));
    }
}
0