結果

問題 No.63 ポッキーゲーム
ユーザー shinwisteriashinwisteria
提出日時 2017-03-18 20:19:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 3,148 ms
コンパイル使用メモリ 71,848 KB
実行使用メモリ 56,352 KB
最終ジャッジ日時 2023-09-18 02:35:05
合計ジャッジ時間 7,067 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,592 KB
testcase_01 AC 130 ms
55,844 KB
testcase_02 AC 128 ms
55,444 KB
testcase_03 AC 124 ms
55,612 KB
testcase_04 AC 122 ms
55,404 KB
testcase_05 AC 123 ms
55,768 KB
testcase_06 AC 131 ms
55,596 KB
testcase_07 AC 125 ms
55,628 KB
testcase_08 AC 124 ms
55,820 KB
testcase_09 AC 124 ms
55,560 KB
testcase_10 AC 123 ms
55,764 KB
testcase_11 AC 124 ms
55,656 KB
testcase_12 AC 126 ms
56,352 KB
testcase_13 AC 128 ms
55,740 KB
testcase_14 AC 131 ms
55,608 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 126 ms
56,000 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 126 ms
55,436 KB
testcase_21 AC 125 ms
55,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class PockyGame {

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

	}

}
0