結果

問題 No.63 ポッキーゲーム
ユーザー TatsuDXTatsuDX
提出日時 2016-09-08 23:41:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 2,775 ms
コンパイル使用メモリ 72,040 KB
実行使用メモリ 57,800 KB
最終ジャッジ日時 2023-08-25 19:16:25
合計ジャッジ時間 6,433 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
55,968 KB
testcase_01 AC 118 ms
55,952 KB
testcase_02 AC 110 ms
56,020 KB
testcase_03 AC 110 ms
55,624 KB
testcase_04 AC 112 ms
55,448 KB
testcase_05 AC 112 ms
56,320 KB
testcase_06 AC 114 ms
56,300 KB
testcase_07 AC 118 ms
55,936 KB
testcase_08 AC 121 ms
55,488 KB
testcase_09 AC 110 ms
55,448 KB
testcase_10 AC 109 ms
55,460 KB
testcase_11 AC 109 ms
55,848 KB
testcase_12 AC 108 ms
55,956 KB
testcase_13 AC 118 ms
55,828 KB
testcase_14 AC 122 ms
55,952 KB
testcase_15 AC 117 ms
55,632 KB
testcase_16 AC 113 ms
55,680 KB
testcase_17 AC 143 ms
55,952 KB
testcase_18 AC 140 ms
55,448 KB
testcase_19 AC 143 ms
55,744 KB
testcase_20 AC 138 ms
55,828 KB
testcase_21 AC 124 ms
57,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt(), k = sc.nextInt(), tmp;
		tmp = n/(k*2);
		if(n%(k*2) == 0){
			tmp--;
		}
		System.out.println(k*tmp);
	}
}
0