結果

問題 No.740 幻の木
ユーザー CroweaCrowea
提出日時 2019-04-29 15:51:26
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 644 bytes
コンパイル時間 2,568 ms
コンパイル使用メモリ 60,732 KB
実行使用メモリ 22,816 KB
最終ジャッジ日時 2023-08-26 00:57:25
合計ジャッジ時間 2,825 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
18,672 KB
testcase_01 AC 57 ms
22,712 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 57 ms
20,832 KB
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

namespace No_740
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            int N,M,P,Q;
            N = a[0];
            M = a[1];
            P = a[2];
            Q = a[3];

            int count = 0;
            while (N > 0)
            {
                while (P <= Q)
                {
                    N -= 2 * M;
                    P++;
                    count++;
                }
                N -= M;
                count++;
            }

            Console.WriteLine(count);
        }
    }
}
0