結果

問題 No.63 ポッキーゲーム
ユーザー Ryota Enokido
提出日時 2018-12-12 10:04:41
言語 Java
(openjdk 23)
結果
AC  
実行時間 416 ms / 5,000 ms
コード長 516 bytes
コンパイル時間 2,024 ms
コンパイル使用メモリ 74,320 KB
実行使用メモリ 54,352 KB
最終ジャッジ日時 2024-09-25 03:30:58
合計ジャッジ時間 6,591 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.lang.Math;

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