結果

問題 No.63 ポッキーゲーム
ユーザー 水野嶺水野嶺
提出日時 2020-05-20 16:49:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 371 ms / 5,000 ms
コード長 344 bytes
コンパイル時間 2,027 ms
コンパイル使用メモリ 74,036 KB
実行使用メモリ 54,264 KB
最終ジャッジ日時 2024-04-09 23:02:26
合計ジャッジ時間 6,766 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
53,984 KB
testcase_01 AC 134 ms
54,060 KB
testcase_02 AC 131 ms
53,712 KB
testcase_03 AC 134 ms
54,064 KB
testcase_04 AC 132 ms
54,036 KB
testcase_05 AC 135 ms
53,924 KB
testcase_06 AC 133 ms
54,164 KB
testcase_07 AC 134 ms
54,172 KB
testcase_08 AC 135 ms
53,964 KB
testcase_09 AC 137 ms
54,104 KB
testcase_10 AC 137 ms
53,860 KB
testcase_11 AC 371 ms
53,860 KB
testcase_12 AC 140 ms
54,224 KB
testcase_13 AC 370 ms
54,264 KB
testcase_14 AC 140 ms
53,968 KB
testcase_15 AC 140 ms
54,052 KB
testcase_16 AC 134 ms
54,092 KB
testcase_17 AC 357 ms
53,852 KB
testcase_18 AC 136 ms
54,248 KB
testcase_19 AC 166 ms
53,852 KB
testcase_20 AC 137 ms
54,204 KB
testcase_21 AC 145 ms
54,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) 
	{
		// 入力値の読み込み
		Scanner sc = new Scanner(System.in);
		int  l = sc.nextInt();
		int  k = sc.nextInt();
		int count=0;
		
		while(l > k*2){
			l -= k*2;
			count +=1;
		}
		
		System.out.println(k*count);
		
	}
}
0