結果

問題 No.51 やる気の問題
ユーザー papipenpapipen
提出日時 2017-04-06 21:39:59
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 273 bytes
コンパイル時間 2,035 ms
コンパイル使用メモリ 71,540 KB
実行使用メモリ 57,848 KB
最終ジャッジ日時 2023-09-24 21:13:43
合計ジャッジ時間 6,403 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,988 KB
testcase_01 AC 129 ms
55,644 KB
testcase_02 AC 128 ms
55,700 KB
testcase_03 AC 126 ms
55,344 KB
testcase_04 AC 130 ms
55,644 KB
testcase_05 RE -
testcase_06 AC 133 ms
55,352 KB
testcase_07 AC 131 ms
55,504 KB
testcase_08 AC 131 ms
55,700 KB
testcase_09 RE -
testcase_10 AC 131 ms
55,548 KB
testcase_11 AC 128 ms
55,504 KB
testcase_12 AC 130 ms
55,616 KB
testcase_13 AC 130 ms
55,564 KB
testcase_14 AC 131 ms
55,832 KB
testcase_15 RE -
testcase_16 AC 129 ms
55,540 KB
testcase_17 AC 129 ms
55,700 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 133 ms
55,344 KB
testcase_21 AC 130 ms
55,772 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class N051{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int w = s.nextInt();
		int d = s.nextInt();
		int a = d - 1;
		for(int i = 0; i < a; i++){
			w -= w / (d * d);
			d--;
		}
		System.out.println(w);
	}
}
0