結果

問題 No.63 ポッキーゲーム
ユーザー リチウム
提出日時 2014-11-11 23:30:35
言語 Java
(openjdk 23)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 3,445 ms
コンパイル使用メモリ 76,552 KB
実行使用メモリ 41,388 KB
最終ジャッジ日時 2024-12-24 04:41:16
合計ジャッジ時間 6,302 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class ok{
	public static void main(String[] args) {
		Scanner sc=new Scanner (System.in);
		int L=sc.nextInt();
		int K=sc.nextInt();
		int ans=0;
		if(L%(K*2)!=0)ans=L/(K*2);
		else ans=L/(K*2)-1;
		ans*=K;
		
		System.out.println(ans);
	}}
0