結果

問題 No.63 ポッキーゲーム
ユーザー jonki324
提出日時 2018-06-04 11:27:00
言語 Java
(openjdk 23)
結果
AC  
実行時間 498 ms / 5,000 ms
コード長 441 bytes
コンパイル時間 1,894 ms
コンパイル使用メモリ 73,972 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-06-30 09:33:44
合計ジャッジ時間 7,022 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int l = scan.nextInt();
        int k = scan.nextInt();
        int c = 0;
        while (true) {
            l -= 2 * k;
            if (l <= 0) {
                break;
            } else {
                c++;
            }
        }
        System.out.println(c * k);
        scan.close();
    }
}
0