結果

問題 No.51 やる気の問題
ユーザー k_kadorak_kadora
提出日時 2015-05-21 11:16:25
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 279 bytes
コンパイル時間 3,489 ms
コンパイル使用メモリ 72,040 KB
実行使用メモリ 55,924 KB
最終ジャッジ日時 2023-09-20 08:36:59
合計ジャッジ時間 7,921 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
55,420 KB
testcase_01 AC 130 ms
55,760 KB
testcase_02 AC 132 ms
55,320 KB
testcase_03 AC 131 ms
55,808 KB
testcase_04 AC 130 ms
55,364 KB
testcase_05 RE -
testcase_06 AC 132 ms
55,720 KB
testcase_07 AC 134 ms
55,924 KB
testcase_08 AC 132 ms
55,864 KB
testcase_09 RE -
testcase_10 AC 132 ms
55,820 KB
testcase_11 AC 131 ms
55,480 KB
testcase_12 AC 137 ms
55,804 KB
testcase_13 AC 133 ms
55,620 KB
testcase_14 AC 132 ms
55,720 KB
testcase_15 RE -
testcase_16 AC 132 ms
55,676 KB
testcase_17 AC 131 ms
55,476 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 133 ms
55,904 KB
testcase_21 AC 130 ms
55,796 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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