結果

問題 No.51 やる気の問題
ユーザー tsunabittsunabit
提出日時 2018-08-05 04:17:28
言語 Java19
(openjdk 21)
結果
RE  
実行時間 -
コード長 466 bytes
コンパイル時間 3,706 ms
コンパイル使用メモリ 75,364 KB
実行使用メモリ 57,812 KB
最終ジャッジ日時 2023-10-19 22:01:14
合計ジャッジ時間 8,085 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
57,520 KB
testcase_01 AC 144 ms
57,500 KB
testcase_02 AC 143 ms
57,516 KB
testcase_03 AC 142 ms
57,456 KB
testcase_04 AC 140 ms
57,228 KB
testcase_05 RE -
testcase_06 AC 143 ms
57,760 KB
testcase_07 AC 143 ms
57,196 KB
testcase_08 AC 142 ms
57,504 KB
testcase_09 RE -
testcase_10 AC 139 ms
57,516 KB
testcase_11 AC 143 ms
57,168 KB
testcase_12 AC 144 ms
57,472 KB
testcase_13 AC 141 ms
57,696 KB
testcase_14 AC 143 ms
57,712 KB
testcase_15 RE -
testcase_16 AC 144 ms
57,748 KB
testcase_17 AC 142 ms
57,740 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 138 ms
57,772 KB
testcase_21 AC 140 ms
57,492 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.Stream;
import java.time.*;
import java.time.format.*;

public class No51 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int w = sc.nextInt(), d = sc.nextInt();
        for(int i = d; i > 1; i--) {
            //System.out.println(w / (Math.pow(i, 2)));
            w -= w / (i * i);
            //System.out.println(w);
        }
        System.out.println(w);
    }
}
0