結果

問題 No.63 ポッキーゲーム
ユーザー Hiroaki Kono
提出日時 2017-10-26 22:27:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 400 bytes
コンパイル時間 3,554 ms
コンパイル使用メモリ 74,440 KB
実行使用メモリ 41,388 KB
最終ジャッジ日時 2024-12-24 05:45:45
合計ジャッジ時間 6,938 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No63 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int pocky = s.nextInt();
        int bite = s.nextInt();
        int eachBite = bite * 2;
        int biteTime = pocky / eachBite;
        if (pocky % eachBite == 0) {
            biteTime--;
        }
        System.out.println(biteTime * bite);
    }
}
0