結果

問題 No.46 はじめのn歩
ユーザー k_kadorak_kadora
提出日時 2015-05-20 03:28:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 246 bytes
コンパイル時間 2,980 ms
コンパイル使用メモリ 71,804 KB
実行使用メモリ 56,504 KB
最終ジャッジ日時 2023-09-20 10:16:26
合計ジャッジ時間 4,820 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
56,240 KB
testcase_01 AC 113 ms
55,800 KB
testcase_02 AC 113 ms
55,840 KB
testcase_03 AC 115 ms
55,928 KB
testcase_04 AC 114 ms
56,068 KB
testcase_05 AC 114 ms
55,664 KB
testcase_06 AC 116 ms
56,504 KB
testcase_07 AC 116 ms
55,664 KB
testcase_08 AC 116 ms
56,108 KB
testcase_09 AC 119 ms
55,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Firstn{
	public static void main(String[] arg){
		int a,b,res;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		res = b/a;
		if(b - a * res >0)res++;
		System.out.println(res);
	}
}
0