結果

問題 No.63 ポッキーゲーム
ユーザー soi09476291soi09476291
提出日時 2019-11-19 08:02:28
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 579 bytes
コンパイル時間 826 ms
コンパイル使用メモリ 106,216 KB
実行使用メモリ 28,164 KB
最終ジャッジ日時 2024-04-14 09:19:55
合計ジャッジ時間 4,174 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 26 ms
24,112 KB
testcase_03 AC 25 ms
24,076 KB
testcase_04 WA -
testcase_05 AC 26 ms
23,652 KB
testcase_06 AC 27 ms
24,116 KB
testcase_07 AC 26 ms
24,028 KB
testcase_08 AC 26 ms
25,944 KB
testcase_09 AC 28 ms
24,064 KB
testcase_10 AC 32 ms
24,152 KB
testcase_11 AC 592 ms
23,988 KB
testcase_12 AC 36 ms
23,928 KB
testcase_13 AC 588 ms
22,072 KB
testcase_14 AC 38 ms
26,064 KB
testcase_15 AC 37 ms
25,868 KB
testcase_16 AC 27 ms
23,824 KB
testcase_17 AC 555 ms
23,772 KB
testcase_18 AC 26 ms
23,780 KB
testcase_19 AC 102 ms
25,936 KB
testcase_20 AC 36 ms
28,164 KB
testcase_21 AC 49 ms
21,812 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Text;
using System.Linq;

namespace ConsoleApp11
{
    class Program
    {
        static void Main(string[] args)
        {
            long sum = 0;

            var input = Console.ReadLine().Split(' ');

            long L = long.Parse(input[0]);
            long K = long.Parse(input[1]);

            while (true)
            {
                L -= K * 2;

                sum += K;

                if(L <= K * 2)
                {
                    break;
                }
            }
            Console.WriteLine(sum);
        }
    }
}
0