結果

問題 No.46 はじめのn歩
ユーザー kou6839kou6839
提出日時 2014-11-18 23:21:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 589 ms / 5,000 ms
コード長 293 bytes
コンパイル時間 3,745 ms
コンパイル使用メモリ 71,960 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-08-30 21:02:15
合計ジャッジ時間 5,515 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,400 KB
testcase_01 AC 119 ms
55,760 KB
testcase_02 AC 119 ms
55,588 KB
testcase_03 AC 119 ms
55,736 KB
testcase_04 AC 119 ms
55,392 KB
testcase_05 AC 118 ms
55,764 KB
testcase_06 AC 118 ms
55,760 KB
testcase_07 AC 117 ms
56,204 KB
testcase_08 AC 589 ms
55,568 KB
testcase_09 AC 116 ms
55,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int ans=0;
		int ho=n;
		n=0;
		while(n<m){
			ans++;
			n+=ho;
		}
		System.out.println(ans);
	}
}	
0