結果
問題 | No.46 はじめのn歩 |
ユーザー | jipo sylph |
提出日時 | 2021-03-04 21:45:18 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 542 bytes |
コンパイル時間 | 2,061 ms |
コンパイル使用メモリ | 74,228 KB |
実行使用メモリ | 54,288 KB |
最終ジャッジ日時 | 2024-04-15 13:46:14 |
合計ジャッジ時間 | 4,173 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 140 ms
41,576 KB |
testcase_02 | WA | - |
testcase_03 | AC | 137 ms
41,392 KB |
testcase_04 | AC | 139 ms
41,516 KB |
testcase_05 | AC | 135 ms
39,824 KB |
testcase_06 | WA | - |
testcase_07 | AC | 137 ms
41,516 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { // 標準入力から読み込む際に、Scannerオブジェクトを使う。 Scanner sc = new Scanner(System.in); // int 1つ分を読み込む int a = sc.nextInt(); // int 1つ分を読み込む int b = sc.nextInt(); int hosu = b / a; if (b % a < a) { System.out.println(hosu + 1); } else { System.out.println(hosu); } } }