結果

問題 No.51 やる気の問題
ユーザー takutakutakutaku
提出日時 2020-09-18 10:53:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 456 bytes
コンパイル時間 2,031 ms
コンパイル使用メモリ 71,612 KB
実行使用メモリ 55,932 KB
最終ジャッジ日時 2023-09-04 08:39:44
合計ジャッジ時間 6,265 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,632 KB
testcase_01 AC 125 ms
55,660 KB
testcase_02 AC 126 ms
55,780 KB
testcase_03 AC 128 ms
55,632 KB
testcase_04 AC 126 ms
55,796 KB
testcase_05 AC 129 ms
55,436 KB
testcase_06 AC 126 ms
55,680 KB
testcase_07 AC 126 ms
55,752 KB
testcase_08 AC 126 ms
55,848 KB
testcase_09 AC 130 ms
55,680 KB
testcase_10 AC 129 ms
55,360 KB
testcase_11 AC 130 ms
53,552 KB
testcase_12 AC 129 ms
55,860 KB
testcase_13 AC 128 ms
55,412 KB
testcase_14 AC 127 ms
55,704 KB
testcase_15 AC 129 ms
53,704 KB
testcase_16 AC 127 ms
55,932 KB
testcase_17 AC 129 ms
55,824 KB
testcase_18 AC 130 ms
55,444 KB
testcase_19 AC 132 ms
55,704 KB
testcase_20 AC 126 ms
55,688 KB
testcase_21 AC 126 ms
55,780 KB
testcase_22 AC 130 ms
55,704 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();
        
        
        // 最終日の残り作業量を把握したい
        for(int i = d; i > 1; i--) {
            
            w = w - w/i/i;
            
        }
        
        System.out.println(w);
        
	}
}
0