結果

問題 No.51 やる気の問題
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-02-04 12:34:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 276 bytes
コンパイル時間 2,152 ms
コンパイル使用メモリ 74,448 KB
実行使用メモリ 47,900 KB
最終ジャッジ日時 2023-10-21 19:10:29
合計ジャッジ時間 6,273 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
40,948 KB
testcase_01 AC 135 ms
40,944 KB
testcase_02 AC 133 ms
40,948 KB
testcase_03 AC 133 ms
40,824 KB
testcase_04 AC 133 ms
40,776 KB
testcase_05 AC 138 ms
41,024 KB
testcase_06 AC 139 ms
40,784 KB
testcase_07 AC 134 ms
40,852 KB
testcase_08 AC 136 ms
40,752 KB
testcase_09 AC 136 ms
40,924 KB
testcase_10 AC 133 ms
40,776 KB
testcase_11 AC 135 ms
41,104 KB
testcase_12 AC 127 ms
39,716 KB
testcase_13 AC 138 ms
40,880 KB
testcase_14 AC 134 ms
40,880 KB
testcase_15 AC 137 ms
40,992 KB
testcase_16 AC 134 ms
40,824 KB
testcase_17 AC 137 ms
40,884 KB
testcase_18 AC 138 ms
41,032 KB
testcase_19 AC 137 ms
40,808 KB
testcase_20 AC 141 ms
40,852 KB
testcase_21 AC 133 ms
47,900 KB
testcase_22 AC 123 ms
39,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Test {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int W = in.nextInt();
		int D = in.nextInt();
		int temp = 0;

		for(int i=D; i>1; i--) {
			W -= (W / ((long)i * i));
		}

		System.out.println(W);
	}
}
0