結果

問題 No.51 やる気の問題
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-25 21:31:42
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 501 bytes
コンパイル時間 2,685 ms
コンパイル使用メモリ 71,712 KB
実行使用メモリ 51,880 KB
最終ジャッジ日時 2023-10-11 10:05:28
合計ジャッジ時間 4,125 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,304 KB
testcase_01 AC 43 ms
49,368 KB
testcase_02 AC 43 ms
49,712 KB
testcase_03 AC 43 ms
49,628 KB
testcase_04 AC 43 ms
49,336 KB
testcase_05 RE -
testcase_06 AC 44 ms
49,264 KB
testcase_07 AC 43 ms
49,380 KB
testcase_08 AC 42 ms
49,276 KB
testcase_09 RE -
testcase_10 AC 43 ms
49,228 KB
testcase_11 AC 43 ms
49,600 KB
testcase_12 AC 44 ms
49,256 KB
testcase_13 AC 43 ms
49,316 KB
testcase_14 AC 42 ms
49,356 KB
testcase_15 RE -
testcase_16 AC 43 ms
49,716 KB
testcase_17 AC 43 ms
49,376 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 43 ms
49,204 KB
testcase_21 AC 43 ms
49,472 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) throws IOException {
        BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
        int W = Integer.parseInt(reader.readLine());
        int D = Integer.parseInt(reader.readLine());
        for (int i = D; i > 1 ; i--) {
           
            W = W - W/(i*i);
        }
        System.out.println(W);

    }
}
0