結果

問題 No.51 やる気の問題
ユーザー spacia
提出日時 2015-12-20 10:31:29
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 466 bytes
コンパイル時間 2,127 ms
コンパイル使用メモリ 74,468 KB
実行使用メモリ 52,320 KB
最終ジャッジ日時 2024-09-17 11:55:17
合計ジャッジ時間 3,833 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

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