結果

問題 No.63 ポッキーゲーム
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-07 00:57:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 394 bytes
コンパイル時間 1,807 ms
コンパイル使用メモリ 70,796 KB
実行使用メモリ 56,664 KB
最終ジャッジ日時 2023-08-25 18:50:28
合計ジャッジ時間 5,567 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,684 KB
testcase_01 AC 120 ms
56,532 KB
testcase_02 AC 120 ms
55,988 KB
testcase_03 AC 120 ms
55,904 KB
testcase_04 AC 120 ms
55,904 KB
testcase_05 AC 121 ms
56,192 KB
testcase_06 AC 119 ms
55,472 KB
testcase_07 AC 119 ms
56,020 KB
testcase_08 AC 121 ms
56,236 KB
testcase_09 AC 121 ms
56,108 KB
testcase_10 AC 121 ms
56,432 KB
testcase_11 AC 120 ms
55,952 KB
testcase_12 AC 119 ms
55,380 KB
testcase_13 AC 120 ms
56,272 KB
testcase_14 AC 120 ms
56,376 KB
testcase_15 AC 120 ms
55,720 KB
testcase_16 AC 121 ms
56,040 KB
testcase_17 AC 119 ms
56,664 KB
testcase_18 AC 121 ms
55,984 KB
testcase_19 AC 120 ms
53,920 KB
testcase_20 AC 119 ms
55,948 KB
testcase_21 AC 121 ms
56,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
       int l = koko.nextInt();
       int k = koko.nextInt();
       int over = l%(2*k);
       if(over!=0){
          System.out.println((l-over)/2); 
       }else if(over==0){
           System.out.println((l-2*k)/2);
       }
       
    }
}
0