結果

問題 No.51 やる気の問題
ユーザー jimanojimano
提出日時 2017-05-06 10:43:29
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 523 bytes
コンパイル時間 1,810 ms
コンパイル使用メモリ 71,744 KB
実行使用メモリ 50,600 KB
最終ジャッジ日時 2023-10-12 14:58:07
合計ジャッジ時間 3,904 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,052 KB
testcase_01 AC 42 ms
49,020 KB
testcase_02 AC 42 ms
49,276 KB
testcase_03 AC 44 ms
49,280 KB
testcase_04 AC 43 ms
49,304 KB
testcase_05 RE -
testcase_06 AC 53 ms
50,540 KB
testcase_07 AC 54 ms
50,076 KB
testcase_08 AC 48 ms
49,160 KB
testcase_09 RE -
testcase_10 AC 48 ms
49,308 KB
testcase_11 AC 48 ms
49,068 KB
testcase_12 AC 53 ms
50,600 KB
testcase_13 AC 52 ms
50,556 KB
testcase_14 AC 51 ms
50,576 KB
testcase_15 RE -
testcase_16 AC 47 ms
49,480 KB
testcase_17 AC 45 ms
49,032 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 53 ms
50,548 KB
testcase_21 AC 43 ms
49,088 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int w = Integer.parseInt(br.readLine());
			int d = Integer.parseInt(br.readLine());
			int moto = 0;

			while (d > 0) {
				moto = (int)Math.floor(w / (d * d));
				w -= moto;
				d--;
			}
			System.out.println(moto);

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0