結果

問題 No.63 ポッキーゲーム
ユーザー 37zigen37zigen
提出日時 2016-04-01 14:14:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 411 bytes
コンパイル時間 4,370 ms
コンパイル使用メモリ 71,424 KB
実行使用メモリ 56,400 KB
最終ジャッジ日時 2023-08-25 19:07:30
合計ジャッジ時間 8,733 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,364 KB
testcase_01 AC 117 ms
55,600 KB
testcase_02 AC 115 ms
55,572 KB
testcase_03 AC 116 ms
55,900 KB
testcase_04 AC 124 ms
55,352 KB
testcase_05 AC 121 ms
55,628 KB
testcase_06 AC 121 ms
55,972 KB
testcase_07 AC 118 ms
55,552 KB
testcase_08 AC 116 ms
55,836 KB
testcase_09 AC 118 ms
55,748 KB
testcase_10 AC 121 ms
55,548 KB
testcase_11 AC 122 ms
55,692 KB
testcase_12 AC 119 ms
55,820 KB
testcase_13 AC 114 ms
55,604 KB
testcase_14 AC 112 ms
55,768 KB
testcase_15 AC 114 ms
55,604 KB
testcase_16 AC 115 ms
55,400 KB
testcase_17 AC 119 ms
55,704 KB
testcase_18 AC 117 ms
55,724 KB
testcase_19 AC 114 ms
55,968 KB
testcase_20 AC 116 ms
56,400 KB
testcase_21 AC 116 ms
55,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder063;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int l=sc.nextInt();//ポッキーの長さ Lmm
		int k=sc.nextInt();//お互いが1回にかじるポッキーの長さ Kmm
		int count=0;
		if(l%(2*k)!=0){
			count=l/(2*k);
		}else if(l%(2*k)==0){
			count=l/(2*k)-1;
		}
		System.out.println(count*k);
	}
}
0