結果

問題 No.63 ポッキーゲーム
ユーザー yun_appyun_app
提出日時 2017-04-11 00:14:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 720 bytes
コンパイル時間 1,831 ms
コンパイル使用メモリ 72,172 KB
実行使用メモリ 49,680 KB
最終ジャッジ日時 2023-08-25 19:24:52
合計ジャッジ時間 3,696 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,296 KB
testcase_01 AC 40 ms
49,152 KB
testcase_02 AC 40 ms
49,628 KB
testcase_03 AC 39 ms
49,392 KB
testcase_04 AC 40 ms
49,572 KB
testcase_05 AC 44 ms
49,196 KB
testcase_06 AC 41 ms
49,240 KB
testcase_07 AC 40 ms
49,392 KB
testcase_08 AC 40 ms
49,252 KB
testcase_09 AC 41 ms
49,476 KB
testcase_10 AC 41 ms
49,260 KB
testcase_11 AC 43 ms
49,632 KB
testcase_12 AC 41 ms
49,416 KB
testcase_13 AC 41 ms
49,168 KB
testcase_14 AC 40 ms
49,680 KB
testcase_15 AC 41 ms
49,140 KB
testcase_16 AC 41 ms
49,156 KB
testcase_17 AC 42 ms
49,296 KB
testcase_18 AC 42 ms
49,196 KB
testcase_19 AC 41 ms
49,176 KB
testcase_20 AC 42 ms
49,240 KB
testcase_21 AC 42 ms
49,264 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 = 0;
        if(L%(2*K) == 0){
            ans = K*((L-1)/(2*K));
        }else{
            ans = K*((L)/(2*K));
        }
        
        System.out.println(ans);
    }
}
0