結果

問題 No.63 ポッキーゲーム
ユーザー ryosuke0825
提出日時 2018-04-08 15:06:55
言語 Java
(openjdk 23)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 3,244 ms
コンパイル使用メモリ 73,992 KB
実行使用メモリ 54,212 KB
最終ジャッジ日時 2024-06-26 20:22:33
合計ジャッジ時間 7,000 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.Scanner;

public class No63 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int L = sc.nextInt();
		int K = sc.nextInt();

		 if (L % (K * 2) == 0) {
			System.out.println((L / K / 2 - 1) * K);
		} else {
			System.out.println(L / K / 2 * K);
		}
	}

}
0