結果

問題 No.63 ポッキーゲーム
ユーザー YoiTaka
提出日時 2017-02-23 07:51:03
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 724 bytes
コンパイル時間 1,092 ms
コンパイル使用メモリ 113,416 KB
実行使用メモリ 26,200 KB
最終ジャッジ日時 2024-12-31 10:47:04
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

public class Hello
{
    public static void Main()
    {
        //var sr = new System.IO.StreamReader("test.txt");
        //System.Console.SetIn(sr);

        string line = System.Console.ReadLine().Trim();
        string[] Data = line.Split(' ');
        int L = int.Parse(Data[0]);
        int K = int.Parse(Data[1]);

        double x = (double)(L) /(double)(2 * K);
        

        if (x <= 1)
        {
            System.Console.WriteLine(0);
            return;
        }
        else if(x == (int)x)
        {
            System.Console.WriteLine((int)x * K-1);
            return;
        }
        else
        {
            System.Console.WriteLine((int)x * K);
            return;

        }
        
    }
}
0