結果

問題 No.63 ポッキーゲーム
ユーザー リチウムリチウム
提出日時 2014-11-11 23:30:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 2,948 ms
コンパイル使用メモリ 71,256 KB
実行使用メモリ 56,508 KB
最終ジャッジ日時 2023-08-25 18:44:20
合計ジャッジ時間 6,575 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,372 KB
testcase_01 AC 117 ms
56,112 KB
testcase_02 AC 115 ms
56,024 KB
testcase_03 AC 113 ms
56,108 KB
testcase_04 AC 113 ms
54,552 KB
testcase_05 AC 112 ms
55,852 KB
testcase_06 AC 107 ms
54,072 KB
testcase_07 AC 107 ms
56,172 KB
testcase_08 AC 115 ms
56,220 KB
testcase_09 AC 113 ms
56,476 KB
testcase_10 AC 112 ms
55,776 KB
testcase_11 AC 118 ms
55,884 KB
testcase_12 AC 118 ms
55,776 KB
testcase_13 AC 119 ms
55,712 KB
testcase_14 AC 122 ms
55,784 KB
testcase_15 AC 119 ms
55,748 KB
testcase_16 AC 118 ms
53,968 KB
testcase_17 AC 117 ms
55,976 KB
testcase_18 AC 112 ms
55,716 KB
testcase_19 AC 111 ms
55,936 KB
testcase_20 AC 111 ms
56,048 KB
testcase_21 AC 110 ms
56,508 KB
権限があれば一括ダウンロードができます

ソースコード

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