結果

問題 No.63 ポッキーゲーム
ユーザー 8130Tsk
提出日時 2015-07-26 22:46:29
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 447 bytes
コンパイル時間 5,604 ms
コンパイル使用メモリ 74,064 KB
実行使用メモリ 54,260 KB
最終ジャッジ日時 2024-07-16 00:18:54
合計ジャッジ時間 9,946 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No63 {

	public void run(){
		Scanner sc = new Scanner(System.in);
		int L = sc.nextInt();
		int K = sc.nextInt();
		int a=L-2*K;
		int count;
		
		if(a >0)
			count=1;
		else
			count=0;
		
		while( a > 0){
			 a=a-2*K;
			 if(a<0)
				 break;
			 count++;
		}
		
		System.out.println(count*K);
		
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new No63().run();
	}

}
0