結果

問題 No.63 ポッキーゲーム
ユーザー kano_town
提出日時 2014-11-19 09:39:15
言語 Java
(openjdk 23)
結果
AC  
実行時間 469 ms / 5,000 ms
コード長 326 bytes
コンパイル時間 3,104 ms
コンパイル使用メモリ 74,300 KB
実行使用メモリ 41,480 KB
最終ジャッジ日時 2024-12-24 04:43:19
合計ジャッジ時間 7,752 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder63 {

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

}
0