結果

問題 No.51 やる気の問題
ユーザー YamaKasaYamaKasa
提出日時 2018-05-10 22:09:57
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 305 bytes
コンパイル時間 2,007 ms
コンパイル使用メモリ 70,952 KB
実行使用メモリ 56,288 KB
最終ジャッジ日時 2023-09-10 12:11:27
合計ジャッジ時間 6,140 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,656 KB
testcase_01 AC 125 ms
55,720 KB
testcase_02 AC 124 ms
55,648 KB
testcase_03 AC 124 ms
55,688 KB
testcase_04 AC 126 ms
55,480 KB
testcase_05 RE -
testcase_06 AC 127 ms
55,716 KB
testcase_07 AC 126 ms
55,628 KB
testcase_08 AC 125 ms
55,808 KB
testcase_09 RE -
testcase_10 AC 125 ms
55,872 KB
testcase_11 AC 124 ms
55,864 KB
testcase_12 AC 126 ms
55,992 KB
testcase_13 AC 125 ms
55,624 KB
testcase_14 AC 127 ms
55,872 KB
testcase_15 RE -
testcase_16 AC 128 ms
56,092 KB
testcase_17 AC 127 ms
55,740 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 128 ms
56,084 KB
testcase_21 AC 123 ms
55,656 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int W = scan.nextInt();
		int D = scan.nextInt();
		int r = 0;
		scan.close();
		while(D > 0) {
			r = W / (D *  D);
			W = W - r;
			D --;
		}
		System.out.println(r);
	}
}
0