結果

問題 No.63 ポッキーゲーム
ユーザー kazapyon27kazapyon27
提出日時 2017-05-07 22:45:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 360 ms / 5,000 ms
コード長 403 bytes
コンパイル時間 2,921 ms
コンパイル使用メモリ 72,308 KB
実行使用メモリ 56,364 KB
最終ジャッジ日時 2023-08-25 19:28:00
合計ジャッジ時間 7,423 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,624 KB
testcase_01 AC 120 ms
55,528 KB
testcase_02 AC 120 ms
55,732 KB
testcase_03 AC 122 ms
55,732 KB
testcase_04 AC 121 ms
56,320 KB
testcase_05 AC 121 ms
55,708 KB
testcase_06 AC 121 ms
55,912 KB
testcase_07 AC 123 ms
55,692 KB
testcase_08 AC 120 ms
55,704 KB
testcase_09 AC 122 ms
55,776 KB
testcase_10 AC 125 ms
55,684 KB
testcase_11 AC 358 ms
55,720 KB
testcase_12 AC 130 ms
55,472 KB
testcase_13 AC 360 ms
55,884 KB
testcase_14 AC 128 ms
55,496 KB
testcase_15 AC 127 ms
55,740 KB
testcase_16 AC 125 ms
56,364 KB
testcase_17 AC 347 ms
55,732 KB
testcase_18 AC 123 ms
55,788 KB
testcase_19 AC 154 ms
56,044 KB
testcase_20 AC 127 ms
55,876 KB
testcase_21 AC 134 ms
55,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*No.63 ポッキーゲーム*/
import java.util.*;
public class NO63 {
	public static void main(String[] args) {
		int p_len,eat_len,Yuchan=0;
		try(Scanner input = new Scanner(System.in)){
			p_len=input.nextInt();
			eat_len=input.nextInt();
			while(p_len>0){
				p_len-=eat_len*2;
				Yuchan++;
			}
			System.out.println((Yuchan-1)*eat_len);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
0