結果

問題 No.63 ポッキーゲーム
ユーザー zmirez
提出日時 2018-05-11 19:34:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 581 ms / 5,000 ms
コード長 435 bytes
コンパイル時間 945 ms
コンパイル使用メモリ 109,788 KB
実行使用メモリ 26,068 KB
最終ジャッジ日時 2024-06-28 03:57:52
合計ジャッジ時間 4,119 ms
ジャッジサーバーID
(参考情報)
judge3 / 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 Program{
    static void Main(string []args){
        string[]t=(Console.ReadLine()).Split(' ');
        long L=long.Parse(t[0]);
        int K=int.Parse(t[1]);
        Console.WriteLine(Pockey(L,K));

    }
    static int Pockey (long L,int K){
        int count=0;
        while(L>0){
            L=L-2*K;
            if(L<=0)break;
            count++;
        }
        return count*K;
    }
}
0