結果

問題 No.63 ポッキーゲーム
ユーザー soujikisoujiki
提出日時 2015-04-29 18:04:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 319 bytes
コンパイル時間 2,973 ms
コンパイル使用メモリ 72,016 KB
実行使用メモリ 56,344 KB
最終ジャッジ日時 2023-08-25 18:51:06
合計ジャッジ時間 6,678 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,808 KB
testcase_01 AC 121 ms
56,132 KB
testcase_02 AC 122 ms
56,044 KB
testcase_03 AC 122 ms
56,088 KB
testcase_04 AC 120 ms
55,744 KB
testcase_05 AC 121 ms
55,972 KB
testcase_06 AC 119 ms
56,144 KB
testcase_07 AC 120 ms
55,816 KB
testcase_08 AC 121 ms
55,576 KB
testcase_09 AC 118 ms
56,276 KB
testcase_10 AC 118 ms
56,344 KB
testcase_11 AC 119 ms
56,336 KB
testcase_12 AC 118 ms
56,332 KB
testcase_13 AC 119 ms
55,756 KB
testcase_14 AC 120 ms
56,052 KB
testcase_15 AC 120 ms
55,888 KB
testcase_16 AC 122 ms
56,276 KB
testcase_17 AC 123 ms
55,964 KB
testcase_18 AC 120 ms
55,656 KB
testcase_19 AC 119 ms
55,932 KB
testcase_20 AC 123 ms
56,232 KB
testcase_21 AC 120 ms
55,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder_63{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int L = stdIn.nextInt();
		int K = stdIn.nextInt();
		int count = L/(2*K);
		if(L == K*count*2){
			System.out.println(K*(count-1));
		}
		else{
			System.out.println(K*count);
		}
	}
}
0