結果

問題 No.51 やる気の問題
ユーザー kzyKTkzyKT
提出日時 2015-03-23 23:32:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 309 bytes
コンパイル時間 2,708 ms
コンパイル使用メモリ 72,164 KB
実行使用メモリ 58,596 KB
最終ジャッジ日時 2023-09-11 09:49:13
合計ジャッジ時間 7,234 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,528 KB
testcase_01 AC 120 ms
55,536 KB
testcase_02 AC 122 ms
55,664 KB
testcase_03 AC 124 ms
55,708 KB
testcase_04 AC 122 ms
55,864 KB
testcase_05 AC 141 ms
58,564 KB
testcase_06 AC 136 ms
57,804 KB
testcase_07 AC 134 ms
57,776 KB
testcase_08 AC 132 ms
57,824 KB
testcase_09 AC 142 ms
58,380 KB
testcase_10 AC 132 ms
58,024 KB
testcase_11 AC 131 ms
57,664 KB
testcase_12 AC 136 ms
58,248 KB
testcase_13 AC 134 ms
58,208 KB
testcase_14 AC 132 ms
58,168 KB
testcase_15 AC 142 ms
58,504 KB
testcase_16 AC 128 ms
56,152 KB
testcase_17 AC 124 ms
55,856 KB
testcase_18 AC 140 ms
58,584 KB
testcase_19 AC 143 ms
58,596 KB
testcase_20 AC 136 ms
58,044 KB
testcase_21 AC 126 ms
56,124 KB
testcase_22 AC 143 ms
58,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;

public class Main {
    static Scanner cin = new Scanner(System.in);
    public static void main(String[] args) {
	Long w=cin.nextLong();
	Long d=cin.nextLong();
	for(Long i=d; i>1; i--) w-=w/(i*i);
	System.out.println(w);
    }
}
0