結果

問題 No.63 ポッキーゲーム
ユーザー kuramu
提出日時 2016-01-19 22:37:42
言語 Java
(openjdk 23)
結果
AC  
実行時間 407 ms / 5,000 ms
コード長 653 bytes
コンパイル時間 1,977 ms
コンパイル使用メモリ 73,872 KB
実行使用メモリ 37,672 KB
最終ジャッジ日時 2024-12-24 04:59:55
合計ジャッジ時間 5,139 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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