結果

問題 No.804 野菜が苦手
ユーザー yupiteru_kunyupiteru_kun
提出日時 2019-04-11 00:34:34
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 2,202 bytes
コンパイル時間 2,256 ms
コンパイル使用メモリ 107,700 KB
実行使用メモリ 22,960 KB
最終ジャッジ日時 2023-09-22 20:02:09
合計ジャッジ時間 4,389 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 57 ms
20,672 KB
testcase_04 WA -
testcase_05 AC 58 ms
20,660 KB
testcase_06 AC 57 ms
22,648 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 57 ms
22,800 KB
testcase_15 AC 56 ms
20,732 KB
testcase_16 AC 57 ms
22,960 KB
testcase_17 AC 57 ms
20,848 KB
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;
using System.Collections.Generic;
using System.Text;

namespace Solver
{
    interface Output
    {
        void Write(object str);
        void WriteLine(object str);
    }

    interface Input
    {
        int NextInt();
        string NextString();
    }

    class Console_ : Input, Output
    {
        Queue<string> param = new Queue<string>();
        int Input.NextInt()
        {
            if (param.Count == 0)
            {
                foreach (var item in Console.ReadLine().Split(' '))
                {
                    param.Enqueue(item);
                }
            }
            return int.Parse(param.Dequeue());
        }
        string Input.NextString()
        {
            if (param.Count == 0)
            {
                foreach (var item in Console.ReadLine().Split(' '))
                {
                    param.Enqueue(item);
                }
            }
            return param.Dequeue();
        }
        void Output.Write(object obj)
        {
            System.Console.Write(obj);
        }
        void Output.WriteLine(object obj)
        {
            System.Console.WriteLine(obj);
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            new Solver(new Console_(), new Console_()).Run();
        }
    }

    class Debug_ : Input
    {
        int i = 0;
        int Input.NextInt()
        {
            return (int)data[i++];
        }
        string Input.NextString()
        {
            return (string)data[i++];
        }
        object[] data =
        {
            1,
            2,
            2,
            2
        };
    }

    class Solver
    {
        Input input;
        Output output;
        public Solver(Input input, Output output)
        {
            this.input = input;
            this.output = output;
        }

        public void Run()
        {
            var A = input.NextInt();
            var B = input.NextInt();
            var C = input.NextInt();
            var D = input.NextInt();
            int tmp = B / C < A ? B / C : A;
            output.WriteLine(tmp < (A + C) / D ? tmp : (A + C) / D);
        }
    }
}
0