結果

問題 No.51 やる気の問題
ユーザー fukuseifukusei
提出日時 2017-05-23 00:29:30
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 270 bytes
コンパイル時間 2,113 ms
コンパイル使用メモリ 74,132 KB
実行使用メモリ 57,692 KB
最終ジャッジ日時 2023-10-19 14:20:34
合計ジャッジ時間 5,811 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
56,172 KB
testcase_01 AC 125 ms
57,432 KB
testcase_02 AC 124 ms
57,628 KB
testcase_03 AC 123 ms
57,436 KB
testcase_04 AC 132 ms
57,664 KB
testcase_05 RE -
testcase_06 AC 134 ms
57,484 KB
testcase_07 AC 134 ms
57,508 KB
testcase_08 AC 126 ms
57,480 KB
testcase_09 RE -
testcase_10 AC 123 ms
57,568 KB
testcase_11 AC 126 ms
57,524 KB
testcase_12 AC 137 ms
57,512 KB
testcase_13 AC 127 ms
57,580 KB
testcase_14 AC 128 ms
57,388 KB
testcase_15 RE -
testcase_16 AC 124 ms
57,304 KB
testcase_17 AC 125 ms
57,480 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 130 ms
57,424 KB
testcase_21 AC 123 ms
57,652 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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