結果

問題 No.46 はじめのn歩
ユーザー QED0302QED0302
提出日時 2018-05-10 16:01:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 600 ms / 5,000 ms
コード長 301 bytes
コンパイル時間 3,729 ms
コンパイル使用メモリ 73,876 KB
実行使用メモリ 56,008 KB
最終ジャッジ日時 2023-09-10 11:39:04
合計ジャッジ時間 5,787 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,596 KB
testcase_01 AC 126 ms
55,560 KB
testcase_02 AC 127 ms
55,780 KB
testcase_03 AC 128 ms
55,652 KB
testcase_04 AC 127 ms
55,572 KB
testcase_05 AC 127 ms
55,872 KB
testcase_06 AC 126 ms
56,008 KB
testcase_07 AC 126 ms
55,732 KB
testcase_08 AC 600 ms
55,680 KB
testcase_09 AC 131 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
	public class num46{
		public static void main(String[] args){
			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();

			int counter = 0;

			for(int i = b;i>0;i-=a){
				counter++;
			}
			System.out.println(counter);
		}
	}
0