結果

問題 No.63 ポッキーゲーム
ユーザー kazapyon27kazapyon27
提出日時 2017-05-07 22:44:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 361 ms / 5,000 ms
コード長 408 bytes
コンパイル時間 3,059 ms
コンパイル使用メモリ 71,688 KB
実行使用メモリ 56,460 KB
最終ジャッジ日時 2023-08-25 19:27:50
合計ジャッジ時間 7,675 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,016 KB
testcase_01 AC 120 ms
55,700 KB
testcase_02 AC 121 ms
56,080 KB
testcase_03 AC 121 ms
55,668 KB
testcase_04 AC 122 ms
55,860 KB
testcase_05 AC 123 ms
56,012 KB
testcase_06 AC 120 ms
55,856 KB
testcase_07 AC 123 ms
55,624 KB
testcase_08 AC 122 ms
56,460 KB
testcase_09 AC 127 ms
55,700 KB
testcase_10 AC 129 ms
55,744 KB
testcase_11 AC 360 ms
56,232 KB
testcase_12 AC 132 ms
55,700 KB
testcase_13 AC 361 ms
55,764 KB
testcase_14 AC 127 ms
56,188 KB
testcase_15 AC 129 ms
55,464 KB
testcase_16 AC 124 ms
56,052 KB
testcase_17 AC 344 ms
56,080 KB
testcase_18 AC 128 ms
56,264 KB
testcase_19 AC 157 ms
56,044 KB
testcase_20 AC 129 ms
55,988 KB
testcase_21 AC 133 ms
55,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*No.5 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