結果

問題 No.51 やる気の問題
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-28 08:45:13
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 337 bytes
コンパイル時間 4,917 ms
コンパイル使用メモリ 73,976 KB
実行使用メモリ 41,904 KB
最終ジャッジ日時 2024-05-01 20:31:13
合計ジャッジ時間 6,971 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
40,980 KB
testcase_01 AC 127 ms
41,216 KB
testcase_02 AC 124 ms
41,472 KB
testcase_03 AC 126 ms
41,124 KB
testcase_04 AC 130 ms
41,296 KB
testcase_05 RE -
testcase_06 AC 125 ms
41,416 KB
testcase_07 AC 125 ms
41,152 KB
testcase_08 AC 125 ms
39,928 KB
testcase_09 RE -
testcase_10 AC 128 ms
41,428 KB
testcase_11 AC 120 ms
41,448 KB
testcase_12 AC 125 ms
41,076 KB
testcase_13 AC 129 ms
41,008 KB
testcase_14 AC 124 ms
41,200 KB
testcase_15 RE -
testcase_16 AC 129 ms
41,236 KB
testcase_17 AC 113 ms
41,516 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 134 ms
41,232 KB
testcase_21 AC 127 ms
41,240 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No51 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int work = s.nextInt();
        int day = s.nextInt();
        while (day > 1) {
            work -= work / (day * day);
            day--;
        }
        System.out.println(work);
    }
}
0