結果

問題 No.63 ポッキーゲーム
ユーザー kuramukuramu
提出日時 2016-01-19 22:37:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 601 ms / 5,000 ms
コード長 653 bytes
コンパイル時間 1,968 ms
コンパイル使用メモリ 71,620 KB
実行使用メモリ 51,036 KB
最終ジャッジ日時 2023-08-25 19:02:53
合計ジャッジ時間 5,798 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,268 KB
testcase_01 AC 44 ms
49,180 KB
testcase_02 AC 40 ms
49,364 KB
testcase_03 AC 41 ms
49,116 KB
testcase_04 AC 43 ms
49,252 KB
testcase_05 AC 40 ms
49,408 KB
testcase_06 AC 40 ms
49,408 KB
testcase_07 AC 44 ms
49,284 KB
testcase_08 AC 42 ms
49,224 KB
testcase_09 AC 48 ms
49,320 KB
testcase_10 AC 56 ms
49,780 KB
testcase_11 AC 598 ms
50,056 KB
testcase_12 AC 62 ms
51,036 KB
testcase_13 AC 601 ms
50,180 KB
testcase_14 AC 65 ms
50,228 KB
testcase_15 AC 60 ms
48,220 KB
testcase_16 AC 52 ms
49,808 KB
testcase_17 AC 559 ms
49,696 KB
testcase_18 AC 53 ms
49,688 KB
testcase_19 AC 122 ms
49,828 KB
testcase_20 AC 60 ms
49,824 KB
testcase_21 AC 71 ms
49,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) {
	      BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
	      String line = "";
	      try {

	    	  String[] temps = stdReader.readLine().split(" ");
	    	  int L = Integer.parseInt(temps[0]);
	    	  int K = Integer.parseInt(temps[1]);
	    	  int count = 0;
	    	  
	    	  while(L-2*(count+1)*K>0){
	    		  count++;
	    	  }
			  System.out.println(count*K);
	      } catch (IOException e) {
			e.printStackTrace();
	      }
	}
}
0