結果

問題 No.63 ポッキーゲーム
ユーザー papipenpapipen
提出日時 2017-03-26 16:18:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 504 ms / 5,000 ms
コード長 286 bytes
コンパイル時間 3,317 ms
コンパイル使用メモリ 71,028 KB
実行使用メモリ 56,004 KB
最終ジャッジ日時 2023-08-25 19:24:14
合計ジャッジ時間 7,571 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,240 KB
testcase_01 AC 128 ms
55,604 KB
testcase_02 AC 127 ms
56,004 KB
testcase_03 AC 124 ms
55,736 KB
testcase_04 AC 125 ms
55,464 KB
testcase_05 AC 125 ms
55,796 KB
testcase_06 AC 126 ms
55,644 KB
testcase_07 AC 126 ms
55,988 KB
testcase_08 AC 126 ms
55,464 KB
testcase_09 AC 128 ms
55,712 KB
testcase_10 AC 133 ms
55,692 KB
testcase_11 AC 504 ms
55,524 KB
testcase_12 AC 133 ms
55,532 KB
testcase_13 AC 503 ms
55,736 KB
testcase_14 AC 136 ms
55,872 KB
testcase_15 AC 135 ms
55,428 KB
testcase_16 AC 130 ms
55,860 KB
testcase_17 AC 487 ms
55,640 KB
testcase_18 AC 134 ms
55,724 KB
testcase_19 AC 180 ms
55,620 KB
testcase_20 AC 136 ms
55,744 KB
testcase_21 AC 145 ms
55,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class pokkii{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int L = s.nextInt();
		int K = s.nextInt();
		int i = 0;
		int sum = 0;
		while(K * 2 * i < L){
			i++;
			sum += K * 2;
		}
			System.out.println(K * (i - 1));
	}
}
0