結果

問題 No.740 幻の木
ユーザー Crowea
提出日時 2019-04-29 15:51:26
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 644 bytes
コンパイル時間 4,108 ms
コンパイル使用メモリ 103,168 KB
実行使用メモリ 18,048 KB
最終ジャッジ日時 2024-12-24 13:30:58
合計ジャッジ時間 2,203 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 1 WA * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

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