結果

問題 No.63 ポッキーゲーム
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-05 10:59:04
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 405 bytes
コンパイル時間 3,129 ms
コンパイル使用メモリ 72,048 KB
実行使用メモリ 56,504 KB
最終ジャッジ日時 2023-09-20 20:29:17
合計ジャッジ時間 6,795 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,944 KB
testcase_01 AC 123 ms
55,928 KB
testcase_02 AC 120 ms
56,072 KB
testcase_03 AC 121 ms
56,216 KB
testcase_04 AC 121 ms
56,004 KB
testcase_05 AC 121 ms
56,016 KB
testcase_06 AC 120 ms
55,712 KB
testcase_07 AC 122 ms
56,220 KB
testcase_08 AC 121 ms
55,380 KB
testcase_09 AC 120 ms
55,600 KB
testcase_10 AC 121 ms
55,760 KB
testcase_11 AC 121 ms
55,684 KB
testcase_12 AC 120 ms
55,824 KB
testcase_13 WA -
testcase_14 AC 119 ms
55,868 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 117 ms
55,612 KB
権限があれば一括ダウンロードができます

ソースコード

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(); // 一回で食べる長さ
		int Y; // ユウちゃんが食べる回数
		
		if(L % (2 * K) == 0) {
			Y = ((L / (2 * K)) - 2) / 2;
		}else {
			Y = L / (2 * K);
		}
		
		System.out.println(Y * K);
	}
}
0