結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー 👑 kakel-sankakel-san
提出日時 2022-06-17 22:35:53
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 676 ms / 3,000 ms
コード長 872 bytes
コンパイル時間 4,448 ms
コンパイル使用メモリ 107,648 KB
実行使用メモリ 30,080 KB
最終ジャッジ日時 2024-04-17 14:51:44
合計ジャッジ時間 20,117 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
19,072 KB
testcase_01 AC 138 ms
23,552 KB
testcase_02 AC 464 ms
27,136 KB
testcase_03 AC 324 ms
25,600 KB
testcase_04 AC 105 ms
23,296 KB
testcase_05 AC 410 ms
26,368 KB
testcase_06 AC 617 ms
28,928 KB
testcase_07 AC 635 ms
28,800 KB
testcase_08 AC 620 ms
28,928 KB
testcase_09 AC 629 ms
28,800 KB
testcase_10 AC 615 ms
28,672 KB
testcase_11 AC 636 ms
28,672 KB
testcase_12 AC 626 ms
28,800 KB
testcase_13 AC 628 ms
28,928 KB
testcase_14 AC 626 ms
28,672 KB
testcase_15 AC 623 ms
28,672 KB
testcase_16 AC 633 ms
29,952 KB
testcase_17 AC 632 ms
29,824 KB
testcase_18 AC 650 ms
30,080 KB
testcase_19 AC 676 ms
30,080 KB
testcase_20 AC 645 ms
29,824 KB
testcase_21 AC 648 ms
29,952 KB
testcase_22 AC 641 ms
29,952 KB
testcase_23 AC 649 ms
29,824 KB
testcase_24 AC 644 ms
29,952 KB
testcase_25 AC 670 ms
30,080 KB
testcase_26 AC 30 ms
19,200 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

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