結果

問題 No.1230 Hall_and_me
ユーザー semisagisemisagi
提出日時 2020-09-18 21:27:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 1,192 bytes
コンパイル時間 2,823 ms
コンパイル使用メモリ 102,632 KB
実行使用メモリ 24,728 KB
最終ジャッジ日時 2023-09-04 09:45:07
合計ジャッジ時間 6,306 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
22,600 KB
testcase_01 AC 65 ms
24,440 KB
testcase_02 AC 65 ms
22,496 KB
testcase_03 AC 65 ms
22,640 KB
testcase_04 AC 65 ms
22,800 KB
testcase_05 AC 64 ms
20,376 KB
testcase_06 AC 65 ms
22,572 KB
testcase_07 AC 64 ms
22,640 KB
testcase_08 AC 65 ms
22,836 KB
testcase_09 AC 64 ms
22,628 KB
testcase_10 AC 64 ms
22,728 KB
testcase_11 AC 64 ms
24,588 KB
testcase_12 AC 67 ms
24,696 KB
testcase_13 AC 65 ms
22,780 KB
testcase_14 AC 65 ms
22,904 KB
testcase_15 AC 69 ms
22,596 KB
testcase_16 AC 65 ms
22,628 KB
testcase_17 AC 64 ms
22,576 KB
testcase_18 AC 65 ms
22,368 KB
testcase_19 AC 65 ms
22,372 KB
testcase_20 AC 64 ms
22,724 KB
testcase_21 AC 65 ms
22,728 KB
testcase_22 AC 64 ms
20,380 KB
testcase_23 AC 66 ms
22,908 KB
testcase_24 AC 65 ms
24,600 KB
testcase_25 AC 64 ms
22,468 KB
testcase_26 AC 65 ms
24,620 KB
testcase_27 AC 66 ms
24,476 KB
testcase_28 AC 64 ms
24,708 KB
testcase_29 AC 65 ms
24,728 KB
testcase_30 AC 65 ms
24,628 KB
testcase_31 AC 65 ms
20,532 KB
testcase_32 AC 67 ms
24,652 KB
testcase_33 AC 65 ms
22,612 KB
testcase_34 AC 66 ms
24,604 KB
testcase_35 AC 66 ms
24,596 KB
testcase_36 AC 67 ms
24,620 KB
testcase_37 AC 65 ms
22,568 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 System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3 {
    class Program {
        static void Main(string[] args) {
            var scanner = new Scanner();
            double P = scanner.NextDouble();
            double Q = scanner.NextDouble();
            double R = scanner.NextDouble();

            double ans = 0;
            ans = Math.Max(ans, (P + Q) / (P + Q + R));
            ans = Math.Max(ans, (Q + R) / (P + Q + R));
            ans = Math.Max(ans, (P + R) / (P + Q + R));
            Console.WriteLine(ans);
            
        }
    }

    class Scanner {
        int index = 0;
        string[] tokens = { };

        public string Next() {
            if (index == tokens.Length) {
                index = 0;
                tokens = Console.ReadLine().Split(' ');
            }
            return tokens[index++];
        }

        public int NextInt() {
            return int.Parse(Next());
        }

        public long NextLong() {
            return long.Parse(Next());
        }

        public double NextDouble() {
            return double.Parse(Next());
        }
    }
}
0