結果

問題 No.51 やる気の問題
ユーザー spaciaspacia
提出日時 2015-12-20 10:31:29
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 466 bytes
コンパイル時間 3,480 ms
コンパイル使用メモリ 74,704 KB
実行使用メモリ 53,504 KB
最終ジャッジ日時 2023-10-17 14:07:03
合計ジャッジ時間 4,704 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
51,400 KB
testcase_01 AC 54 ms
53,416 KB
testcase_02 AC 55 ms
53,412 KB
testcase_03 AC 55 ms
53,420 KB
testcase_04 AC 57 ms
52,348 KB
testcase_05 RE -
testcase_06 AC 55 ms
53,424 KB
testcase_07 AC 55 ms
53,416 KB
testcase_08 AC 55 ms
52,324 KB
testcase_09 RE -
testcase_10 AC 55 ms
53,416 KB
testcase_11 AC 54 ms
53,408 KB
testcase_12 AC 55 ms
53,416 KB
testcase_13 AC 55 ms
53,420 KB
testcase_14 AC 55 ms
53,420 KB
testcase_15 RE -
testcase_16 AC 55 ms
53,412 KB
testcase_17 AC 53 ms
53,412 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 55 ms
53,408 KB
testcase_21 AC 54 ms
53,412 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main51 {
	
	public static void out (Object out) {
		System.out.println(out);
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		int w = Integer.parseInt(br.readLine());
		int d = Integer.parseInt(br.readLine());
		int ans = 0;
		
		for (int i = 0; i < d; i++)
			w -= (ans = w / ((d - i) * (d - i)));
		
		out(ans);
	}
}
0