結果

問題 No.63 ポッキーゲーム
ユーザー jimanojimano
提出日時 2016-07-16 21:47:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 288 ms / 5,000 ms
コード長 549 bytes
コンパイル時間 3,372 ms
コンパイル使用メモリ 70,920 KB
実行使用メモリ 49,968 KB
最終ジャッジ日時 2023-08-25 19:14:34
合計ジャッジ時間 5,615 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,300 KB
testcase_01 AC 42 ms
49,676 KB
testcase_02 AC 42 ms
49,124 KB
testcase_03 AC 42 ms
49,492 KB
testcase_04 AC 42 ms
49,180 KB
testcase_05 AC 42 ms
49,632 KB
testcase_06 AC 41 ms
49,296 KB
testcase_07 AC 43 ms
49,092 KB
testcase_08 AC 42 ms
49,400 KB
testcase_09 AC 50 ms
49,248 KB
testcase_10 AC 54 ms
49,620 KB
testcase_11 AC 287 ms
49,716 KB
testcase_12 AC 57 ms
49,792 KB
testcase_13 AC 288 ms
49,968 KB
testcase_14 AC 58 ms
49,712 KB
testcase_15 AC 58 ms
49,852 KB
testcase_16 AC 53 ms
49,592 KB
testcase_17 AC 272 ms
49,656 KB
testcase_18 AC 53 ms
49,584 KB
testcase_19 AC 84 ms
49,644 KB
testcase_20 AC 56 ms
49,552 KB
testcase_21 AC 63 ms
49,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0063 {
	public static void main(String[] args) {
		try (BufferedReader br = 
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] str = br.readLine().split(" ");
			int L = Integer.parseInt(str[0]);
			int K = Integer.parseInt(str[1]);
			int cnt;
			
			for(cnt = 0; L > (K * 2); cnt++){
				L -= K * 2;
			}
	        System.out.println(K * cnt);
	        
		} catch (IOException e) {
			e.printStackTrace();
		}
    }
}
0