結果

問題 No.804 野菜が苦手
ユーザー curryudon08curryudon08
提出日時 2020-06-25 14:48:39
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 578 bytes
コンパイル時間 1,986 ms
コンパイル使用メモリ 102,312 KB
実行使用メモリ 24,704 KB
最終ジャッジ日時 2023-09-16 22:38:47
合計ジャッジ時間 4,115 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
20,660 KB
testcase_01 WA -
testcase_02 AC 49 ms
20,640 KB
testcase_03 AC 51 ms
20,748 KB
testcase_04 AC 51 ms
20,600 KB
testcase_05 AC 51 ms
20,724 KB
testcase_06 AC 51 ms
20,620 KB
testcase_07 AC 51 ms
20,684 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 51 ms
20,636 KB
testcase_15 AC 52 ms
22,652 KB
testcase_16 AC 50 ms
20,644 KB
testcase_17 AC 50 ms
20,664 KB
testcase_18 AC 50 ms
18,604 KB
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;

namespace _0804
{
    class Program
    {
        static void Main(string[] args)
        {
            var _ = Console.ReadLine().Split();
            var a = int.Parse(_[0]);
            var b = int.Parse(_[1]);
            var c = int.Parse(_[2]);
            var d = int.Parse(_[3]);

            var y = 0;
            for(var i = 0; i < d / (c + a); i++){
                if(a >= 1 && b >= c){
                    y++;
                    a--;
                    b -= c;
                }
            }

            Console.WriteLine(y);
        }
    }
}
0