結果

問題 No.63 ポッキーゲーム
ユーザー yun_app
提出日時 2017-04-11 00:11:19
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 703 bytes
コンパイル時間 2,697 ms
コンパイル使用メモリ 74,348 KB
実行使用メモリ 50,376 KB
最終ジャッジ日時 2024-07-18 05:47:19
合計ジャッジ時間 4,105 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] line = br.readLine().split(" ");
        int L = Integer.parseInt(line[0]);
        int K = Integer.parseInt(line[1]);
        
        int ans = ((L-1)/(K*2));
        if(ans>1){
            ans = ans*K;
        }else{
            ans = 0;
        }
        
        System.out.println(ans);
    }
}
0