結果

問題 No.63 ポッキーゲーム
ユーザー bayashiko_rbayashiko_r
提出日時 2018-11-02 00:40:49
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 369 ms / 5,000 ms
コード長 507 bytes
コンパイル時間 787 ms
コンパイル使用メモリ 109,116 KB
実行使用メモリ 25,984 KB
最終ジャッジ日時 2024-04-30 14:35:23
合計ジャッジ時間 3,024 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
25,984 KB
testcase_01 AC 21 ms
23,772 KB
testcase_02 AC 20 ms
24,108 KB
testcase_03 AC 20 ms
24,240 KB
testcase_04 AC 21 ms
22,068 KB
testcase_05 AC 21 ms
24,072 KB
testcase_06 AC 20 ms
22,064 KB
testcase_07 AC 21 ms
24,028 KB
testcase_08 AC 21 ms
23,932 KB
testcase_09 AC 21 ms
24,236 KB
testcase_10 AC 25 ms
23,908 KB
testcase_11 AC 360 ms
24,208 KB
testcase_12 AC 29 ms
24,032 KB
testcase_13 AC 369 ms
23,856 KB
testcase_14 AC 31 ms
25,816 KB
testcase_15 AC 29 ms
24,028 KB
testcase_16 AC 22 ms
23,644 KB
testcase_17 AC 347 ms
25,816 KB
testcase_18 AC 23 ms
23,772 KB
testcase_19 AC 69 ms
23,896 KB
testcase_20 AC 28 ms
25,872 KB
testcase_21 AC 35 ms
23,856 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program {
    static void Main(string[] args) {
        //入力
        string s = Console.ReadLine();
        string[] t = s.Split(' ');
        //数字の割り当て
        int L = int.Parse(t[0]);  //ポッキーの長さ
        int K = int.Parse(t[1]);  //一回にかじる長さ

        //計算
        //かじる回数
        int num = 0;
        while (K * num * 2 < L) {
            num++;
        }

        //出力
        Console.WriteLine(K * (num - 1));
    }
}
0