結果

問題 No.51 やる気の問題
ユーザー 37zigen37zigen
提出日時 2016-03-11 18:37:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 5,000 ms
コード長 410 bytes
コンパイル時間 4,360 ms
コンパイル使用メモリ 76,644 KB
実行使用メモリ 57,712 KB
最終ジャッジ日時 2023-10-25 05:27:03
合計ジャッジ時間 8,514 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
57,576 KB
testcase_01 AC 146 ms
57,344 KB
testcase_02 AC 146 ms
57,228 KB
testcase_03 AC 149 ms
57,508 KB
testcase_04 AC 149 ms
57,072 KB
testcase_05 AC 150 ms
57,204 KB
testcase_06 AC 145 ms
57,372 KB
testcase_07 AC 146 ms
57,572 KB
testcase_08 AC 145 ms
57,192 KB
testcase_09 AC 150 ms
55,656 KB
testcase_10 AC 148 ms
57,164 KB
testcase_11 AC 140 ms
56,092 KB
testcase_12 AC 151 ms
57,640 KB
testcase_13 AC 139 ms
56,124 KB
testcase_14 AC 150 ms
57,508 KB
testcase_15 AC 149 ms
57,156 KB
testcase_16 AC 146 ms
57,168 KB
testcase_17 AC 148 ms
57,584 KB
testcase_18 AC 142 ms
56,116 KB
testcase_19 AC 152 ms
57,712 KB
testcase_20 AC 138 ms
56,104 KB
testcase_21 AC 146 ms
57,680 KB
testcase_22 AC 149 ms
57,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package 練習;

import java.util.Date;
import java.util.Scanner;
public class main{
	public static void main(String[] args){
		long exec_time=new Date().getTime();
		Scanner sc=new Scanner(System.in);
		long w=sc.nextLong();
		long d=sc.nextLong();
		long done=0;
		
		for(long i=d;i>1;i--){
			w-=(long)w/(i*i);
		}
		System.out.println(w);
		System.err.println(new Date().getTime()-exec_time+"ms");
		
	}
}
0