結果

問題 No.63 ポッキーゲーム
ユーザー 親子丼
提出日時 2016-03-29 10:02:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 2,905 ms / 5,000 ms
コード長 981 bytes
コンパイル時間 1,179 ms
コンパイル使用メモリ 104,832 KB
実行使用メモリ 17,920 KB
最終ジャッジ日時 2024-12-24 05:04:44
合計ジャッジ時間 13,438 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class yukicoder
{
    static void Main(string[] args)
    {
        var r = new Reader();
        var L = r.nextInt();
        var K = r.nextInt();
        var yu_mm = 0;
        for (var i = K; i < L; i += K )
        {
            if (i >= L / 2.0 )
            {
                break;
            }
            else
            {
                yu_mm += K;
            }
        }
        Console.WriteLine(yu_mm);
    }
}

class Reader
{
    string[] s;
    int i;
    char[] cs = new char[] { ' ' };

    public Reader()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if ( i < s.Length )
            return s[i++];
        var input = Console.ReadLine();
        while ( input == "" )
            input = Console.ReadLine();
        s = input.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return next();
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

}
0