結果

問題 No.63 ポッキーゲーム
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-02-04 13:33:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 329 bytes
コンパイル時間 3,691 ms
コンパイル使用メモリ 70,936 KB
実行使用メモリ 57,660 KB
最終ジャッジ日時 2023-08-25 19:04:16
合計ジャッジ時間 5,593 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,784 KB
testcase_01 AC 122 ms
53,820 KB
testcase_02 AC 121 ms
56,300 KB
testcase_03 AC 120 ms
55,632 KB
testcase_04 AC 121 ms
56,004 KB
testcase_05 AC 120 ms
56,036 KB
testcase_06 AC 120 ms
55,756 KB
testcase_07 AC 120 ms
55,984 KB
testcase_08 AC 121 ms
55,764 KB
testcase_09 AC 120 ms
55,888 KB
testcase_10 AC 119 ms
55,828 KB
testcase_11 AC 120 ms
57,660 KB
testcase_12 AC 121 ms
56,016 KB
testcase_13 AC 119 ms
55,764 KB
testcase_14 AC 120 ms
55,904 KB
testcase_15 AC 120 ms
56,144 KB
testcase_16 AC 120 ms
55,412 KB
testcase_17 AC 120 ms
55,920 KB
testcase_18 AC 121 ms
55,492 KB
testcase_19 AC 120 ms
56,020 KB
testcase_20 AC 122 ms
55,660 KB
testcase_21 AC 125 ms
55,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Test {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		int l = in.nextInt();
		int k = in.nextInt();

		int temp = k * 2;
		if(l % temp == 0) {
			System.out.println((l / temp - 1) * k);
		} else {
			System.out.println(l / temp * k);
		}
	}
}
0