結果

問題 No.51 やる気の問題
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-14 20:35:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 256 bytes
コンパイル時間 3,194 ms
コンパイル使用メモリ 72,588 KB
実行使用メモリ 56,152 KB
最終ジャッジ日時 2023-08-24 19:23:44
合計ジャッジ時間 7,099 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,740 KB
testcase_01 AC 120 ms
56,020 KB
testcase_02 AC 120 ms
55,660 KB
testcase_03 AC 119 ms
56,152 KB
testcase_04 AC 118 ms
55,700 KB
testcase_05 AC 122 ms
55,728 KB
testcase_06 AC 121 ms
55,864 KB
testcase_07 AC 121 ms
55,952 KB
testcase_08 AC 121 ms
56,104 KB
testcase_09 AC 123 ms
55,668 KB
testcase_10 AC 123 ms
56,064 KB
testcase_11 AC 120 ms
55,976 KB
testcase_12 AC 119 ms
55,576 KB
testcase_13 AC 121 ms
55,788 KB
testcase_14 AC 120 ms
55,480 KB
testcase_15 AC 124 ms
56,060 KB
testcase_16 AC 120 ms
55,800 KB
testcase_17 AC 119 ms
56,116 KB
testcase_18 AC 123 ms
55,956 KB
testcase_19 AC 123 ms
55,528 KB
testcase_20 AC 122 ms
55,700 KB
testcase_21 AC 119 ms
55,788 KB
testcase_22 AC 123 ms
55,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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