結果

問題 No.51 やる気の問題
ユーザー fukuseifukusei
提出日時 2017-05-23 00:31:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 154 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 2,155 ms
コンパイル使用メモリ 73,832 KB
実行使用メモリ 57,740 KB
最終ジャッジ日時 2023-10-19 14:20:59
合計ジャッジ時間 6,506 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
57,372 KB
testcase_01 AC 134 ms
57,404 KB
testcase_02 AC 154 ms
57,604 KB
testcase_03 AC 132 ms
57,376 KB
testcase_04 AC 136 ms
57,516 KB
testcase_05 AC 134 ms
55,620 KB
testcase_06 AC 135 ms
57,428 KB
testcase_07 AC 144 ms
57,344 KB
testcase_08 AC 135 ms
57,476 KB
testcase_09 AC 136 ms
57,660 KB
testcase_10 AC 135 ms
57,376 KB
testcase_11 AC 132 ms
57,588 KB
testcase_12 AC 136 ms
57,380 KB
testcase_13 AC 137 ms
57,364 KB
testcase_14 AC 136 ms
57,488 KB
testcase_15 AC 136 ms
57,380 KB
testcase_16 AC 132 ms
57,380 KB
testcase_17 AC 132 ms
57,480 KB
testcase_18 AC 136 ms
57,628 KB
testcase_19 AC 151 ms
57,708 KB
testcase_20 AC 141 ms
57,368 KB
testcase_21 AC 134 ms
55,904 KB
testcase_22 AC 136 ms
57,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class test{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int W = sc.nextInt();
		long D = sc.nextInt();
		
		if(D != 1){
			for(long i=D; i>1; i--){
				W -= W / (i * i);
				
			}
		}
		System.out.println(W);
	}
}
0