結果

問題 No.51 やる気の問題
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-11 05:14:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 340 bytes
コンパイル時間 1,922 ms
コンパイル使用メモリ 71,528 KB
実行使用メモリ 56,552 KB
最終ジャッジ日時 2023-08-16 18:19:31
合計ジャッジ時間 6,177 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,820 KB
testcase_01 AC 121 ms
56,084 KB
testcase_02 AC 123 ms
55,668 KB
testcase_03 AC 123 ms
55,664 KB
testcase_04 AC 121 ms
56,232 KB
testcase_05 AC 123 ms
55,720 KB
testcase_06 AC 122 ms
55,696 KB
testcase_07 AC 123 ms
56,012 KB
testcase_08 AC 125 ms
55,452 KB
testcase_09 AC 127 ms
56,200 KB
testcase_10 AC 123 ms
55,980 KB
testcase_11 AC 123 ms
55,852 KB
testcase_12 AC 123 ms
56,092 KB
testcase_13 AC 120 ms
55,868 KB
testcase_14 AC 122 ms
55,876 KB
testcase_15 AC 124 ms
56,088 KB
testcase_16 AC 122 ms
56,008 KB
testcase_17 AC 122 ms
55,688 KB
testcase_18 AC 124 ms
55,620 KB
testcase_19 AC 124 ms
56,552 KB
testcase_20 AC 120 ms
56,296 KB
testcase_21 AC 121 ms
55,808 KB
testcase_22 AC 129 ms
56,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int W = sc.nextInt();
        int D = sc.nextInt();
        
        while(D!=1){
            int w1d = W/D/D;
            W = W - w1d;
            D--;
        }
        System.out.println(W);
    }
}
0