結果

問題 No.51 やる気の問題
ユーザー カニ戯(ryカニ戯(ry
提出日時 2015-02-26 11:29:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 231 bytes
コンパイル時間 2,303 ms
コンパイル使用メモリ 71,444 KB
実行使用メモリ 57,444 KB
最終ジャッジ日時 2023-09-06 04:57:25
合計ジャッジ時間 6,417 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
55,824 KB
testcase_01 AC 134 ms
56,536 KB
testcase_02 AC 134 ms
55,720 KB
testcase_03 AC 129 ms
55,732 KB
testcase_04 AC 135 ms
55,712 KB
testcase_05 AC 137 ms
56,160 KB
testcase_06 AC 136 ms
56,008 KB
testcase_07 AC 134 ms
56,040 KB
testcase_08 AC 138 ms
56,524 KB
testcase_09 AC 132 ms
55,884 KB
testcase_10 AC 135 ms
55,932 KB
testcase_11 AC 136 ms
56,004 KB
testcase_12 AC 131 ms
55,848 KB
testcase_13 AC 133 ms
55,996 KB
testcase_14 AC 132 ms
55,768 KB
testcase_15 AC 137 ms
55,848 KB
testcase_16 AC 132 ms
57,444 KB
testcase_17 AC 136 ms
55,732 KB
testcase_18 AC 137 ms
56,664 KB
testcase_19 AC 142 ms
55,988 KB
testcase_20 AC 135 ms
55,940 KB
testcase_21 AC 137 ms
55,668 KB
testcase_22 AC 137 ms
55,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main {
	public static void main(String[] a) {
		Scanner s=new Scanner(System.in);
		float W=s.nextFloat(),D=s.nextFloat();
		while(D>1)W-=(int)(W/D/(D--));
		System.out.println((int)W);
	}
}
0