結果

問題 No.46 はじめのn歩
ユーザー h_tyokinuhatah_tyokinuhata
提出日時 2015-12-23 01:26:29
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 4,590 ms
コンパイル使用メモリ 73,748 KB
実行使用メモリ 57,720 KB
最終ジャッジ日時 2023-10-18 23:23:59
合計ジャッジ時間 5,649 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
57,316 KB
testcase_01 WA -
testcase_02 AC 147 ms
57,276 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 144 ms
57,720 KB
testcase_07 WA -
testcase_08 AC 905 ms
57,336 KB
testcase_09 AC 139 ms
57,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 
class Main {
    public static void main(String[] args) {
    	
    	Scanner sc = new Scanner(System.in);

    	int a = sc.nextInt();
    	int b = sc.nextInt();
    	int cnt = 0;
    	while(b > -1) {
    		b-=a;
    		if(b > -1) {
    			cnt++;
    		} else {
    			break;
    		}
    	}
    	System.out.println(cnt);
    }
}
0