結果
| 問題 | No.23 技の選択 | 
| コンテスト | |
| ユーザー |  mban | 
| 提出日時 | 2017-04-28 20:04:28 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 24 ms / 5,000 ms | 
| コード長 | 793 bytes | 
| コンパイル時間 | 2,345 ms | 
| コンパイル使用メモリ | 110,684 KB | 
| 実行使用メモリ | 18,944 KB | 
| 最終ジャッジ日時 | 2024-06-28 17:22:56 | 
| 合計ジャッジ時間 | 4,284 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 33 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
    }
}
            
            
            
        