結果

問題 No.23 技の選択
ユーザー mbanmban
提出日時 2017-04-28 20:04:28
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 793 bytes
コンパイル時間 2,946 ms
コンパイル使用メモリ 107,780 KB
実行使用メモリ 25,012 KB
最終ジャッジ日時 2023-09-11 02:51:22
合計ジャッジ時間 6,311 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
22,756 KB
testcase_01 AC 62 ms
24,720 KB
testcase_02 AC 62 ms
24,800 KB
testcase_03 AC 62 ms
22,784 KB
testcase_04 AC 62 ms
24,796 KB
testcase_05 AC 62 ms
22,752 KB
testcase_06 AC 63 ms
22,764 KB
testcase_07 AC 62 ms
24,796 KB
testcase_08 AC 61 ms
22,784 KB
testcase_09 AC 62 ms
24,780 KB
testcase_10 AC 62 ms
24,648 KB
testcase_11 AC 62 ms
24,768 KB
testcase_12 AC 62 ms
22,732 KB
testcase_13 AC 62 ms
24,720 KB
testcase_14 AC 62 ms
25,012 KB
testcase_15 AC 62 ms
24,760 KB
testcase_16 AC 61 ms
22,764 KB
testcase_17 AC 61 ms
22,804 KB
testcase_18 AC 62 ms
22,628 KB
testcase_19 AC 62 ms
22,736 KB
testcase_20 AC 61 ms
22,752 KB
testcase_21 AC 62 ms
22,796 KB
testcase_22 AC 62 ms
22,840 KB
testcase_23 AC 61 ms
22,776 KB
testcase_24 AC 62 ms
22,756 KB
testcase_25 AC 63 ms
24,776 KB
testcase_26 AC 62 ms
22,852 KB
testcase_27 AC 62 ms
22,752 KB
testcase_28 AC 62 ms
22,732 KB
testcase_29 AC 63 ms
22,576 KB
testcase_30 AC 62 ms
22,836 KB
testcase_31 AC 64 ms
22,708 KB
testcase_32 AC 62 ms
22,648 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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

public class Program
{
    public static void Main(string[] args)
    {
        new Magatro().Solve();
    }
}

class Magatro
{
    private int H, A, D;
    public void Solve()
    {
        string[] line = Console.ReadLine().Split(' ');
        H = int.Parse(line[0]);
        A = int.Parse(line[1]);
        D = int.Parse(line[2]);

        double min = 999999;

        for (int i = 0; i <= (H - 1 + A) / A; i++)
        {
            int n = Math.Max(0, H - A * i);
            int c = (n - 1 + D) / D;
            min = Math.Min(min, 1.5 * c + i);
        }

        Console.WriteLine(min);
    }
}
0