結果

問題 No.63 ポッキーゲーム
ユーザー soujikisoujiki
提出日時 2015-04-29 17:59:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 331 ms / 5,000 ms
コード長 316 bytes
コンパイル時間 3,017 ms
コンパイル使用メモリ 72,496 KB
実行使用メモリ 56,504 KB
最終ジャッジ日時 2023-08-25 18:50:59
合計ジャッジ時間 7,084 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
56,200 KB
testcase_01 AC 113 ms
55,804 KB
testcase_02 AC 111 ms
55,984 KB
testcase_03 AC 111 ms
56,216 KB
testcase_04 AC 110 ms
55,764 KB
testcase_05 AC 118 ms
56,052 KB
testcase_06 AC 113 ms
55,792 KB
testcase_07 AC 114 ms
56,068 KB
testcase_08 AC 109 ms
55,888 KB
testcase_09 AC 117 ms
56,300 KB
testcase_10 AC 118 ms
56,100 KB
testcase_11 AC 331 ms
56,228 KB
testcase_12 AC 122 ms
56,244 KB
testcase_13 AC 325 ms
55,764 KB
testcase_14 AC 118 ms
56,504 KB
testcase_15 AC 123 ms
56,360 KB
testcase_16 AC 120 ms
55,856 KB
testcase_17 AC 323 ms
56,220 KB
testcase_18 AC 114 ms
55,844 KB
testcase_19 AC 138 ms
56,008 KB
testcase_20 AC 118 ms
55,916 KB
testcase_21 AC 127 ms
56,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder_63{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int L = stdIn.nextInt();
		int K = stdIn.nextInt();
		int count = 0;
		while(true){
			if(L<=2*K){
				System.out.println(count*K);
				break;
			}
			L -= 2*K;
			count++; 
		}
	}
}
0