結果

問題 No.63 ポッキーゲーム
ユーザー Taka
提出日時 2016-04-09 16:32:28
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 8,592 ms
コンパイル使用メモリ 74,332 KB
実行使用メモリ 54,196 KB
最終ジャッジ日時 2024-10-04 05:05:55
合計ジャッジ時間 8,215 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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