結果

問題 No.51 やる気の問題
ユーザー marumaru
提出日時 2016-03-22 22:52:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 299 bytes
コンパイル時間 3,831 ms
コンパイル使用メモリ 74,792 KB
実行使用メモリ 54,680 KB
最終ジャッジ日時 2024-04-09 03:26:31
合計ジャッジ時間 8,012 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
54,124 KB
testcase_01 AC 114 ms
52,724 KB
testcase_02 AC 124 ms
54,020 KB
testcase_03 AC 123 ms
53,884 KB
testcase_04 AC 124 ms
54,372 KB
testcase_05 AC 113 ms
53,008 KB
testcase_06 AC 125 ms
54,680 KB
testcase_07 AC 113 ms
53,036 KB
testcase_08 AC 127 ms
53,960 KB
testcase_09 AC 128 ms
53,940 KB
testcase_10 AC 125 ms
54,116 KB
testcase_11 AC 127 ms
54,164 KB
testcase_12 AC 126 ms
54,152 KB
testcase_13 AC 124 ms
54,188 KB
testcase_14 AC 125 ms
54,052 KB
testcase_15 AC 124 ms
53,600 KB
testcase_16 AC 124 ms
54,256 KB
testcase_17 AC 125 ms
54,216 KB
testcase_18 AC 126 ms
54,096 KB
testcase_19 AC 126 ms
54,292 KB
testcase_20 AC 112 ms
52,724 KB
testcase_21 AC 122 ms
54,184 KB
testcase_22 AC 126 ms
54,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

	}
}
0