結果

問題 No.415 ぴょん
ユーザー deliciouscicadadeliciouscicada
提出日時 2016-09-22 09:48:17
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 3,587 ms
コンパイル使用メモリ 74,832 KB
実行使用メモリ 41,512 KB
最終ジャッジ日時 2024-04-28 17:22:25
合計ジャッジ時間 8,234 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,348 KB
testcase_01 AC 132 ms
41,160 KB
testcase_02 AC 117 ms
39,788 KB
testcase_03 AC 129 ms
41,052 KB
testcase_04 WA -
testcase_05 AC 128 ms
41,088 KB
testcase_06 WA -
testcase_07 AC 119 ms
39,788 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 129 ms
41,160 KB
testcase_11 WA -
testcase_12 AC 132 ms
41,220 KB
testcase_13 AC 130 ms
41,028 KB
testcase_14 AC 131 ms
41,504 KB
testcase_15 AC 129 ms
41,088 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 128 ms
41,040 KB
testcase_21 AC 129 ms
41,228 KB
testcase_22 AC 128 ms
41,176 KB
testcase_23 WA -
testcase_24 AC 129 ms
41,176 KB
testcase_25 AC 124 ms
41,248 KB
testcase_26 AC 115 ms
40,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No415_pyon {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 足場の数
		int stepNum = sc.nextInt();

		// ジャンプ間隔の数
		int stepInterval = sc.nextInt();

		// ジャンプ可能回数
		int maxStepNum = 0;

		if(stepNum % stepInterval == 0) {
			// 足場の数がジャンプ間隔で割り切れる場合
			maxStepNum = stepNum / stepInterval - 1;

		} else {
			maxStepNum = stepNum - 1;

		}

		// 結果の表示
		System.out.println(maxStepNum);
	}
}
0