結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,556 KB
testcase_01 AC 53 ms
22,752 KB
testcase_02 AC 54 ms
20,608 KB
testcase_03 AC 54 ms
20,712 KB
testcase_04 AC 54 ms
22,688 KB
testcase_05 AC 53 ms
22,796 KB
testcase_06 AC 54 ms
22,752 KB
testcase_07 AC 54 ms
20,628 KB
testcase_08 AC 54 ms
20,580 KB
testcase_09 AC 54 ms
22,756 KB
testcase_10 AC 53 ms
20,624 KB
testcase_11 AC 53 ms
20,620 KB
testcase_12 AC 53 ms
20,608 KB
testcase_13 AC 55 ms
20,640 KB
testcase_14 AC 53 ms
20,604 KB
testcase_15 AC 51 ms
18,728 KB
testcase_16 AC 52 ms
20,708 KB
testcase_17 AC 52 ms
22,664 KB
testcase_18 AC 51 ms
22,580 KB
testcase_19 AC 51 ms
20,580 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 / (1 + c); i++){
                if(a >= 1 && b >= c){
                    y++;
                    a--;
                    b -= c;
                }
            }

            Console.WriteLine(y);
        }
    }
}
0