結果

問題 No.63 ポッキーゲーム
ユーザー yun_appyun_app
提出日時 2017-04-11 00:11:19
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 703 bytes
コンパイル時間 1,921 ms
コンパイル使用メモリ 71,192 KB
実行使用メモリ 51,684 KB
最終ジャッジ日時 2023-09-25 06:57:04
合計ジャッジ時間 3,840 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,156 KB
testcase_01 AC 41 ms
49,668 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 44 ms
49,348 KB
testcase_05 AC 42 ms
49,460 KB
testcase_06 AC 42 ms
49,424 KB
testcase_07 AC 42 ms
49,412 KB
testcase_08 AC 43 ms
49,260 KB
testcase_09 AC 40 ms
49,360 KB
testcase_10 AC 42 ms
49,612 KB
testcase_11 AC 41 ms
49,328 KB
testcase_12 AC 41 ms
49,380 KB
testcase_13 AC 42 ms
49,528 KB
testcase_14 AC 41 ms
49,260 KB
testcase_15 AC 41 ms
49,324 KB
testcase_16 AC 43 ms
49,452 KB
testcase_17 AC 43 ms
49,204 KB
testcase_18 AC 42 ms
49,204 KB
testcase_19 AC 42 ms
47,296 KB
testcase_20 AC 42 ms
49,156 KB
testcase_21 AC 41 ms
49,204 KB
権限があれば一括ダウンロードができます

ソースコード

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