結果

問題 No.51 やる気の問題
ユーザー tsunabittsunabit
提出日時 2018-08-05 04:11:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 464 bytes
コンパイル時間 3,731 ms
コンパイル使用メモリ 75,920 KB
実行使用メモリ 66,784 KB
最終ジャッジ日時 2023-10-19 22:00:59
合計ジャッジ時間 11,824 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 139 ms
57,468 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 RE -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 RE -
testcase_16 WA -
testcase_17 WA -
testcase_18 RE -
testcase_19 RE -
testcase_20 WA -
testcase_21 WA -
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