結果

問題 No.415 ぴょん
ユーザー deliciouscicada
提出日時 2016-09-22 09:48:17
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 3,494 ms
コンパイル使用メモリ 74,120 KB
実行使用メモリ 41,404 KB
最終ジャッジ日時 2024-11-17 11:16:46
合計ジャッジ時間 7,260 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 10
権限があれば一括ダウンロードができます

ソースコード

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