結果

問題 No.51 やる気の問題
ユーザー Mcpu3Mcpu3
提出日時 2018-06-23 16:49:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 248 bytes
コンパイル時間 4,136 ms
コンパイル使用メモリ 71,256 KB
実行使用メモリ 56,584 KB
最終ジャッジ日時 2023-09-13 08:31:16
合計ジャッジ時間 7,828 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,776 KB
testcase_01 AC 119 ms
56,256 KB
testcase_02 AC 119 ms
55,948 KB
testcase_03 AC 119 ms
56,040 KB
testcase_04 AC 125 ms
55,940 KB
testcase_05 AC 122 ms
56,096 KB
testcase_06 AC 122 ms
56,080 KB
testcase_07 AC 120 ms
56,076 KB
testcase_08 AC 120 ms
55,912 KB
testcase_09 AC 122 ms
55,544 KB
testcase_10 AC 120 ms
55,800 KB
testcase_11 AC 120 ms
55,524 KB
testcase_12 AC 121 ms
55,864 KB
testcase_13 AC 121 ms
55,800 KB
testcase_14 AC 122 ms
55,768 KB
testcase_15 AC 122 ms
55,804 KB
testcase_16 AC 120 ms
55,904 KB
testcase_17 AC 120 ms
56,204 KB
testcase_18 AC 128 ms
55,484 KB
testcase_19 AC 123 ms
56,584 KB
testcase_20 AC 120 ms
55,788 KB
testcase_21 AC 118 ms
56,000 KB
testcase_22 AC 121 ms
55,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no51{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		long d,w,i;
		w=stdIn.nextLong();
		d=stdIn.nextLong();
		for(i=d;i>1;i--) w-=w/(i*i);
		System.out.print(w);
	}
}
0