結果

問題 No.63 ポッキーゲーム
コンテスト
ユーザー heyanxx
提出日時 2019-07-05 16:35:27
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 255 ms / 5,000 ms
コード長 697 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,311 ms
コンパイル使用メモリ 81,028 KB
実行使用メモリ 39,656 KB
最終ジャッジ日時 2026-04-10 03:22:47
合計ジャッジ時間 4,963 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package test.demo;

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

public class Yukicoder63 {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		String[]str=input();
		int L=Integer.parseInt(str[0]);
		int K=Integer.parseInt(str[1]);
		int count=0;
		
		while(true) {
			L=L-2*K;
			if(L<=0) {
				System.out.println(count);
				return;
			}
			count+=K;
		}
		

	}

	public static  String[] input() throws IOException {
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		
		String str=br.readLine();
		String[]str2=str.split(" ");
		
		return str2;
	}
}
0