結果

問題 No.46 はじめのn歩
ユーザー YamaKasa
提出日時 2018-04-19 15:41:56
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 385 bytes
コンパイル時間 1,945 ms
コンパイル使用メモリ 74,064 KB
実行使用メモリ 54,188 KB
最終ジャッジ日時 2024-06-27 04:47:38
合計ジャッジ時間 3,817 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		//System.out.println("歩幅");
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		//System.out.println("区間");
		int b = scanner.nextInt();
		scanner.close();
		int n = 0;	//歩数
		if(b%a == 0) {
			 n = b/a;
		}else{
			n = b/a+1;
		}
		System.out.println(n);
	}
}
0