結果

問題 No.63 ポッキーゲーム
ユーザー koukonkokoukonko
提出日時 2015-12-07 17:22:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 420 ms / 5,000 ms
コード長 550 bytes
コンパイル時間 3,111 ms
コンパイル使用メモリ 71,372 KB
実行使用メモリ 50,812 KB
最終ジャッジ日時 2023-08-25 18:59:54
合計ジャッジ時間 5,971 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,228 KB
testcase_01 AC 41 ms
49,324 KB
testcase_02 AC 41 ms
49,236 KB
testcase_03 AC 41 ms
49,248 KB
testcase_04 AC 41 ms
49,232 KB
testcase_05 AC 41 ms
49,304 KB
testcase_06 AC 42 ms
49,312 KB
testcase_07 AC 44 ms
49,228 KB
testcase_08 AC 43 ms
49,700 KB
testcase_09 AC 52 ms
50,812 KB
testcase_10 AC 55 ms
49,764 KB
testcase_11 AC 420 ms
50,136 KB
testcase_12 AC 59 ms
49,788 KB
testcase_13 AC 412 ms
49,876 KB
testcase_14 AC 60 ms
49,816 KB
testcase_15 AC 60 ms
49,844 KB
testcase_16 AC 53 ms
49,708 KB
testcase_17 AC 398 ms
49,744 KB
testcase_18 AC 52 ms
49,752 KB
testcase_19 AC 102 ms
49,740 KB
testcase_20 AC 56 ms
49,740 KB
testcase_21 AC 68 ms
49,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
	public static void main(String[] args) {
		BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));

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

		} catch (IOException e) {

		}
	}
}
0