結果

問題 No.51 やる気の問題
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-14 20:34:56
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 255 bytes
コンパイル時間 4,672 ms
コンパイル使用メモリ 71,640 KB
実行使用メモリ 56,288 KB
最終ジャッジ日時 2023-08-24 19:23:32
合計ジャッジ時間 8,960 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,636 KB
testcase_01 AC 120 ms
55,732 KB
testcase_02 AC 120 ms
56,288 KB
testcase_03 AC 122 ms
56,164 KB
testcase_04 AC 119 ms
55,864 KB
testcase_05 RE -
testcase_06 AC 119 ms
55,796 KB
testcase_07 AC 118 ms
55,796 KB
testcase_08 AC 118 ms
56,036 KB
testcase_09 RE -
testcase_10 AC 119 ms
55,768 KB
testcase_11 AC 122 ms
55,528 KB
testcase_12 AC 121 ms
56,148 KB
testcase_13 AC 123 ms
56,068 KB
testcase_14 AC 121 ms
55,820 KB
testcase_15 RE -
testcase_16 AC 120 ms
55,324 KB
testcase_17 AC 120 ms
55,920 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 120 ms
55,740 KB
testcase_21 AC 119 ms
55,776 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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