結果

問題 No.63 ポッキーゲーム
ユーザー nCk_cv
提出日時 2016-02-01 20:13:18
言語 Java
(openjdk 23)
結果
AC  
実行時間 153 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 2,302 ms
コンパイル使用メモリ 73,888 KB
実行使用メモリ 41,284 KB
最終ジャッジ日時 2024-12-24 05:01:10
合計ジャッジ時間 6,070 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int L = sc.nextInt(); 
		int K = sc.nextInt();
		System.out.println(((L / (2 * K) - (L % (2 * K) == 0?1:0)) * K));
	}
}
0