結果

問題 No.63 ポッキーゲーム
ユーザー ikawaiikawai
提出日時 2023-09-05 15:28:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 2,362 ms
コンパイル使用メモリ 71,520 KB
実行使用メモリ 55,984 KB
最終ジャッジ日時 2023-09-05 15:28:16
合計ジャッジ時間 7,897 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,768 KB
testcase_01 AC 126 ms
55,736 KB
testcase_02 WA -
testcase_03 AC 125 ms
55,804 KB
testcase_04 AC 125 ms
55,964 KB
testcase_05 WA -
testcase_06 AC 125 ms
55,656 KB
testcase_07 AC 126 ms
55,624 KB
testcase_08 WA -
testcase_09 AC 129 ms
55,700 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 135 ms
55,772 KB
testcase_13 AC 421 ms
55,984 KB
testcase_14 AC 136 ms
55,664 KB
testcase_15 AC 136 ms
55,872 KB
testcase_16 AC 129 ms
55,700 KB
testcase_17 AC 401 ms
55,708 KB
testcase_18 AC 129 ms
53,632 KB
testcase_19 AC 168 ms
55,548 KB
testcase_20 AC 134 ms
55,744 KB
testcase_21 AC 142 ms
55,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Wandbox
{
    public static void main(String[] args)
    {
    	Scanner sc = new Scanner(System.in);
    	
    	int l = sc.nextInt();
    	int k = sc.nextInt();
    	int ans = 0;
    	l /= 2;
    	
    	while (l > 0) {
    		l -= k;
    		if (l <= 0) {
    			break;
    		} 
    		ans += k;
    	} 
    	
    	System.out.println(ans);
    }
}
0