結果

問題 No.63 ポッキーゲーム
ユーザー nCk_cvnCk_cv
提出日時 2016-02-01 20:13:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 1,864 ms
コンパイル使用メモリ 70,960 KB
実行使用メモリ 56,324 KB
最終ジャッジ日時 2023-08-25 19:04:08
合計ジャッジ時間 5,625 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,160 KB
testcase_01 AC 120 ms
56,216 KB
testcase_02 AC 120 ms
55,812 KB
testcase_03 AC 120 ms
55,832 KB
testcase_04 AC 120 ms
56,004 KB
testcase_05 AC 120 ms
55,668 KB
testcase_06 AC 121 ms
55,948 KB
testcase_07 AC 121 ms
55,936 KB
testcase_08 AC 122 ms
56,268 KB
testcase_09 AC 119 ms
55,692 KB
testcase_10 AC 120 ms
55,788 KB
testcase_11 AC 120 ms
55,724 KB
testcase_12 AC 120 ms
55,912 KB
testcase_13 AC 119 ms
55,568 KB
testcase_14 AC 119 ms
56,324 KB
testcase_15 AC 120 ms
55,816 KB
testcase_16 AC 119 ms
55,676 KB
testcase_17 AC 120 ms
55,504 KB
testcase_18 AC 119 ms
55,920 KB
testcase_19 AC 123 ms
55,520 KB
testcase_20 AC 119 ms
55,508 KB
testcase_21 AC 119 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int L = sc.nextInt(); 
		int K = sc.nextInt();
		System.out.println(((L / (2 * K) - (L % (2 * K) == 0?1:0)) * K));
	}
}
0