結果

問題 No.51 やる気の問題
ユーザー jimanojimano
提出日時 2017-05-06 10:52:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 46 ms / 5,000 ms
コード長 510 bytes
コンパイル時間 1,869 ms
コンパイル使用メモリ 70,800 KB
実行使用メモリ 49,716 KB
最終ジャッジ日時 2023-10-12 14:58:54
合計ジャッジ時間 3,850 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,212 KB
testcase_01 AC 42 ms
49,716 KB
testcase_02 AC 41 ms
47,400 KB
testcase_03 AC 42 ms
49,204 KB
testcase_04 AC 42 ms
49,084 KB
testcase_05 AC 44 ms
49,196 KB
testcase_06 AC 43 ms
49,032 KB
testcase_07 AC 43 ms
49,248 KB
testcase_08 AC 42 ms
49,084 KB
testcase_09 AC 45 ms
49,084 KB
testcase_10 AC 42 ms
49,020 KB
testcase_11 AC 43 ms
49,580 KB
testcase_12 AC 43 ms
49,232 KB
testcase_13 AC 43 ms
49,028 KB
testcase_14 AC 43 ms
49,144 KB
testcase_15 AC 43 ms
49,060 KB
testcase_16 AC 41 ms
49,384 KB
testcase_17 AC 42 ms
49,168 KB
testcase_18 AC 44 ms
49,084 KB
testcase_19 AC 45 ms
49,160 KB
testcase_20 AC 43 ms
49,020 KB
testcase_21 AC 42 ms
49,644 KB
testcase_22 AC 46 ms
49,384 KB
権限があれば一括ダウンロードができます

ソースコード

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))) {
			long w = Integer.parseInt(br.readLine());
			int d = Integer.parseInt(br.readLine());
			int moto = 0;

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

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