結果

問題 No.51 やる気の問題
ユーザー kuramukuramu
提出日時 2016-01-20 22:57:53
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 543 bytes
コンパイル時間 1,697 ms
コンパイル使用メモリ 74,500 KB
実行使用メモリ 53,584 KB
最終ジャッジ日時 2023-10-21 13:37:28
合計ジャッジ時間 4,005 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
53,444 KB
testcase_01 AC 46 ms
53,440 KB
testcase_02 AC 46 ms
53,456 KB
testcase_03 AC 50 ms
52,400 KB
testcase_04 AC 47 ms
52,340 KB
testcase_05 RE -
testcase_06 AC 47 ms
53,448 KB
testcase_07 AC 46 ms
52,308 KB
testcase_08 AC 46 ms
52,308 KB
testcase_09 RE -
testcase_10 AC 47 ms
53,444 KB
testcase_11 AC 48 ms
53,440 KB
testcase_12 AC 46 ms
53,444 KB
testcase_13 AC 46 ms
53,440 KB
testcase_14 AC 45 ms
53,456 KB
testcase_15 RE -
testcase_16 AC 46 ms
53,452 KB
testcase_17 AC 47 ms
53,452 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 58 ms
52,340 KB
testcase_21 AC 47 ms
53,456 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) {
	      BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));

	      try {
		      int W = Integer.parseInt(stdReader.readLine());
		      int D = Integer.parseInt(stdReader.readLine());	      
		      for(int i=D;1<i;i--){
		    	  W -= W/(i*i);
		      }
		      System.out.println(W);
	    	  } catch (IOException e) {
			e.printStackTrace();
	      }
	}	
}
0