結果

問題 No.63 ポッキーゲーム
ユーザー goma
提出日時 2017-09-23 13:55:04
言語 Java
(openjdk 23)
結果
AC  
実行時間 350 ms / 5,000 ms
コード長 313 bytes
コンパイル時間 2,368 ms
コンパイル使用メモリ 77,160 KB
実行使用メモリ 41,432 KB
最終ジャッジ日時 2024-12-24 05:41:26
合計ジャッジ時間 6,292 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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 m = 0, count = 0, ans = 0;
		while (l > 2 * k) {
			l -= 2 * k;
			count++;
		}
		ans = count * k;
		System.out.println(ans);
	}
}
0