結果

問題 No.51 やる気の問題
ユーザー soujikisoujiki
提出日時 2015-04-27 16:01:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 330 bytes
コンパイル時間 3,325 ms
コンパイル使用メモリ 72,416 KB
実行使用メモリ 56,240 KB
最終ジャッジ日時 2023-09-18 13:52:39
合計ジャッジ時間 7,698 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,852 KB
testcase_01 AC 120 ms
56,012 KB
testcase_02 AC 123 ms
55,532 KB
testcase_03 AC 123 ms
55,528 KB
testcase_04 AC 124 ms
56,148 KB
testcase_05 AC 129 ms
56,008 KB
testcase_06 AC 126 ms
55,696 KB
testcase_07 AC 126 ms
55,676 KB
testcase_08 AC 125 ms
56,040 KB
testcase_09 AC 127 ms
55,812 KB
testcase_10 AC 125 ms
56,080 KB
testcase_11 AC 125 ms
56,164 KB
testcase_12 AC 123 ms
55,712 KB
testcase_13 AC 125 ms
55,564 KB
testcase_14 AC 127 ms
55,936 KB
testcase_15 AC 125 ms
55,840 KB
testcase_16 AC 121 ms
55,788 KB
testcase_17 AC 123 ms
56,072 KB
testcase_18 AC 125 ms
55,880 KB
testcase_19 AC 124 ms
55,516 KB
testcase_20 AC 126 ms
56,240 KB
testcase_21 AC 128 ms
55,800 KB
testcase_22 AC 125 ms
56,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder_51{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int W = stdIn.nextInt();
		int D = stdIn.nextInt();
		while(true){
			int count = W/(int)Math.pow(D,2);
			W -= count;
			D--;
			if(W<=0){
				System.out.println(count);
				break;
			} 
		}
	}
}
0