結果

問題 No.51 やる気の問題
ユーザー kano_townkano_town
提出日時 2014-11-19 19:46:41
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 270 bytes
コンパイル時間 3,151 ms
コンパイル使用メモリ 71,412 KB
実行使用メモリ 56,364 KB
最終ジャッジ日時 2023-08-30 21:53:32
合計ジャッジ時間 7,042 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,936 KB
testcase_01 AC 119 ms
55,972 KB
testcase_02 AC 119 ms
56,180 KB
testcase_03 AC 121 ms
55,832 KB
testcase_04 AC 121 ms
55,816 KB
testcase_05 RE -
testcase_06 AC 121 ms
55,788 KB
testcase_07 AC 121 ms
55,928 KB
testcase_08 AC 120 ms
54,040 KB
testcase_09 RE -
testcase_10 AC 118 ms
56,048 KB
testcase_11 AC 121 ms
55,844 KB
testcase_12 AC 121 ms
56,016 KB
testcase_13 AC 123 ms
56,156 KB
testcase_14 AC 121 ms
55,476 KB
testcase_15 RE -
testcase_16 AC 120 ms
55,772 KB
testcase_17 AC 121 ms
55,916 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 120 ms
55,980 KB
testcase_21 AC 121 ms
55,620 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder51 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int d = sc.nextInt();
		
		for (; d > 1; d--) 	w -= w / (d * d);
		System.out.println(w);
	}
}
0