結果

問題 No.46 はじめのn歩
ユーザー enuo-9
提出日時 2016-09-15 13:57:27
言語 Java
(openjdk 23)
結果
AC  
実行時間 814 ms / 5,000 ms
コード長 407 bytes
コンパイル時間 3,657 ms
コンパイル使用メモリ 74,208 KB
実行使用メモリ 41,308 KB
最終ジャッジ日時 2024-11-17 06:04:21
合計ジャッジ時間 5,648 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No046 {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		//歩幅
		int hohaba = 0;
		//距離
		int distance = 0;

		//歩幅を入力
		hohaba = sc.nextInt();
		//距離を入力
		distance = sc.nextInt();

		int cnt = 1;

		while(hohaba < distance){
			distance = distance - hohaba;
			cnt++;
		}

		System.out.println(cnt);

	}
}
0