結果

問題 No.46 はじめのn歩
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-21 10:56:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 2,792 ms
コンパイル使用メモリ 74,216 KB
実行使用メモリ 41,868 KB
最終ジャッジ日時 2024-05-01 09:12:18
合計ジャッジ時間 4,522 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,204 KB
testcase_01 AC 130 ms
41,592 KB
testcase_02 AC 130 ms
41,476 KB
testcase_03 AC 130 ms
41,468 KB
testcase_04 AC 131 ms
41,868 KB
testcase_05 AC 137 ms
41,320 KB
testcase_06 AC 132 ms
41,820 KB
testcase_07 AC 130 ms
41,292 KB
testcase_08 AC 117 ms
41,640 KB
testcase_09 AC 131 ms
41,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		System.out.println(b % a == 0 ? b / a : (a + b) / a);
 	}
}

0