結果

問題 No.51 やる気の問題
ユーザー Pump0129Pump0129
提出日時 2018-03-27 22:33:11
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 74,340 KB
実行使用メモリ 41,704 KB
最終ジャッジ日時 2024-06-25 12:56:08
合計ジャッジ時間 6,538 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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