結果

問題 No.51 やる気の問題
ユーザー Pump0129Pump0129
提出日時 2018-03-27 22:33:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 2,045 ms
コンパイル使用メモリ 71,440 KB
実行使用メモリ 56,376 KB
最終ジャッジ日時 2023-09-07 19:10:01
合計ジャッジ時間 6,065 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,836 KB
testcase_01 AC 120 ms
53,584 KB
testcase_02 AC 120 ms
55,656 KB
testcase_03 AC 121 ms
55,600 KB
testcase_04 AC 121 ms
55,672 KB
testcase_05 AC 130 ms
55,772 KB
testcase_06 AC 123 ms
55,660 KB
testcase_07 AC 128 ms
55,844 KB
testcase_08 AC 122 ms
55,696 KB
testcase_09 AC 123 ms
56,204 KB
testcase_10 AC 130 ms
55,692 KB
testcase_11 AC 124 ms
55,824 KB
testcase_12 AC 124 ms
55,772 KB
testcase_13 AC 122 ms
55,468 KB
testcase_14 AC 122 ms
55,720 KB
testcase_15 AC 126 ms
55,976 KB
testcase_16 AC 121 ms
55,744 KB
testcase_17 AC 121 ms
55,932 KB
testcase_18 AC 126 ms
55,892 KB
testcase_19 AC 127 ms
56,376 KB
testcase_20 AC 123 ms
55,956 KB
testcase_21 AC 126 ms
55,916 KB
testcase_22 AC 126 ms
55,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package net.ipipip0129.yukicoder.no51;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int work = scan.nextInt();
        int end_time = scan.nextInt();

        scan.close();

        for (int i = end_time; 1 < i ; i--) {
            work -= work / (int) Math.pow(i, 2);
        }

        System.out.println(work);
    }
}
0