結果

問題 No.63 ポッキーゲーム
ユーザー HimatsubushinHimatsubushin
提出日時 2019-01-14 14:48:18
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,187 ms / 5,000 ms
コード長 528 bytes
コンパイル時間 2,157 ms
コンパイル使用メモリ 101,812 KB
実行使用メモリ 22,888 KB
最終ジャッジ日時 2023-09-02 12:56:34
合計ジャッジ時間 8,474 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,776 KB
testcase_01 AC 57 ms
20,716 KB
testcase_02 AC 57 ms
22,836 KB
testcase_03 AC 58 ms
22,888 KB
testcase_04 AC 57 ms
22,688 KB
testcase_05 AC 57 ms
22,836 KB
testcase_06 AC 57 ms
22,888 KB
testcase_07 AC 57 ms
22,764 KB
testcase_08 AC 56 ms
22,772 KB
testcase_09 AC 57 ms
20,572 KB
testcase_10 AC 68 ms
22,792 KB
testcase_11 AC 1,183 ms
20,724 KB
testcase_12 AC 79 ms
20,840 KB
testcase_13 AC 1,187 ms
20,804 KB
testcase_14 AC 80 ms
20,720 KB
testcase_15 AC 82 ms
22,776 KB
testcase_16 AC 59 ms
18,596 KB
testcase_17 AC 1,111 ms
20,856 KB
testcase_18 AC 60 ms
20,808 KB
testcase_19 AC 209 ms
20,708 KB
testcase_20 AC 76 ms
22,844 KB
testcase_21 AC 105 ms
20,740 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 No063_ポッキーゲーム
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int l = int.Parse(input[0]);
            int k = int.Parse(input[1]);
            int count = 0;

            for (; l - 2 * k > 0; l -= 2 * k)
                count++;

            if (l == 0)
                Console.WriteLine((count - 1) * k);
            else
                Console.WriteLine(count * k);
        }
    }
}
0