結果

問題 No.51 やる気の問題
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-04-03 03:39:27
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 856 bytes
コンパイル時間 3,300 ms
コンパイル使用メモリ 72,712 KB
実行使用メモリ 57,428 KB
最終ジャッジ日時 2023-09-17 03:53:05
合計ジャッジ時間 6,053 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
55,564 KB
testcase_01 AC 106 ms
55,700 KB
testcase_02 AC 102 ms
55,416 KB
testcase_03 AC 105 ms
55,984 KB
testcase_04 AC 105 ms
56,208 KB
testcase_05 RE -
testcase_06 AC 102 ms
56,224 KB
testcase_07 AC 104 ms
55,688 KB
testcase_08 AC 108 ms
55,672 KB
testcase_09 RE -
testcase_10 AC 107 ms
55,964 KB
testcase_11 AC 107 ms
56,060 KB
testcase_12 AC 104 ms
55,892 KB
testcase_13 AC 103 ms
56,152 KB
testcase_14 AC 102 ms
55,992 KB
testcase_15 RE -
testcase_16 AC 108 ms
56,108 KB
testcase_17 AC 110 ms
55,876 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 105 ms
56,476 KB
testcase_21 AC 109 ms
55,584 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.51 やる気の問題

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public class No51 {
    
    static final Scanner sc = new Scanner(System.in);
    static final PrintWriter out = new PrintWriter(System.out,false);

    static void solve() {
        int w = sc.nextInt();
        int d = sc.nextInt();
        int ans = 0;
        for (int i=d; i>0; i--) {
            int t = w/(i*i);
            ans = t;
            w -= t;
        }
        out.println(ans);
    }

    public static void main(String[] args) {
        long start = System.currentTimeMillis();

        solve();
        out.flush();

        long end = System.currentTimeMillis();
        //trace(end-start + "ms");
        sc.close();
    }

    static void trace(Object... o) { System.out.println(deepToString(o));}
}
0