結果

問題 No.51 やる気の問題
ユーザー fal_rndfal_rnd
提出日時 2017-08-25 23:54:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 515 bytes
コンパイル時間 2,534 ms
コンパイル使用メモリ 79,744 KB
実行使用メモリ 41,484 KB
最終ジャッジ日時 2024-04-23 15:50:18
合計ジャッジ時間 5,881 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
40,320 KB
testcase_01 AC 109 ms
40,108 KB
testcase_02 AC 121 ms
41,212 KB
testcase_03 AC 109 ms
40,284 KB
testcase_04 AC 121 ms
41,112 KB
testcase_05 AC 124 ms
41,236 KB
testcase_06 AC 126 ms
41,280 KB
testcase_07 AC 121 ms
41,296 KB
testcase_08 AC 121 ms
41,424 KB
testcase_09 AC 114 ms
40,244 KB
testcase_10 AC 124 ms
41,240 KB
testcase_11 AC 126 ms
41,484 KB
testcase_12 AC 125 ms
41,080 KB
testcase_13 AC 127 ms
41,340 KB
testcase_14 AC 124 ms
41,024 KB
testcase_15 AC 123 ms
40,840 KB
testcase_16 AC 110 ms
39,732 KB
testcase_17 AC 115 ms
40,696 KB
testcase_18 AC 125 ms
41,356 KB
testcase_19 AC 126 ms
41,364 KB
testcase_20 AC 124 ms
41,144 KB
testcase_21 AC 108 ms
40,168 KB
testcase_22 AC 124 ms
41,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.stream.IntStream;

public class Main{
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static IntStream INS(int n) {return REPS(n).map(i->getInt());}
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}

	public static void main(String[]$){
		int w=getInt();
		for(int i=getInt();i>1;--i)
			w-=(int)(w*1.0/i/i);
		System.out.println(w);
	}
}
0