結果

問題 No.1273 はじめのζ関数
ユーザー 遭難者遭難者
提出日時 2020-10-30 22:16:02
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 2,007 ms
コンパイル使用メモリ 71,932 KB
実行使用メモリ 56,412 KB
最終ジャッジ日時 2023-09-29 06:32:10
合計ジャッジ時間 12,734 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 215 ms
55,848 KB
testcase_01 AC 218 ms
55,812 KB
testcase_02 AC 227 ms
56,084 KB
testcase_03 AC 217 ms
56,032 KB
testcase_04 AC 219 ms
56,016 KB
testcase_05 AC 219 ms
56,072 KB
testcase_06 AC 216 ms
55,792 KB
testcase_07 AC 219 ms
55,880 KB
testcase_08 AC 216 ms
55,876 KB
testcase_09 AC 225 ms
55,780 KB
testcase_10 AC 218 ms
55,872 KB
testcase_11 AC 217 ms
56,104 KB
testcase_12 AC 220 ms
56,168 KB
testcase_13 AC 215 ms
55,912 KB
testcase_14 AC 219 ms
55,716 KB
testcase_15 AC 229 ms
55,968 KB
testcase_16 AC 231 ms
55,684 KB
testcase_17 AC 219 ms
55,604 KB
testcase_18 AC 228 ms
55,680 KB
testcase_19 AC 228 ms
55,896 KB
testcase_20 WA -
testcase_21 AC 206 ms
55,412 KB
testcase_22 AC 215 ms
55,644 KB
testcase_23 AC 213 ms
56,340 KB
testcase_24 AC 217 ms
55,656 KB
testcase_25 AC 219 ms
55,724 KB
testcase_26 AC 206 ms
55,972 KB
testcase_27 AC 204 ms
55,768 KB
testcase_28 AC 206 ms
56,088 KB
testcase_29 AC 206 ms
55,648 KB
testcase_30 AC 205 ms
55,436 KB
testcase_31 AC 215 ms
54,056 KB
testcase_32 AC 205 ms
55,764 KB
testcase_33 AC 214 ms
55,420 KB
testcase_34 AC 208 ms
55,876 KB
testcase_35 AC 215 ms
55,636 KB
testcase_36 AC 204 ms
56,404 KB
testcase_37 AC 204 ms
56,412 KB
testcase_38 AC 207 ms
55,668 KB
testcase_39 AC 209 ms
55,800 KB
testcase_40 AC 180 ms
56,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int x = Integer.parseInt(sc.next()) - 1;
		double q = 0;
		for(int i = 1 ; i <= Math.pow(10 , 6) ; i++){
			q += Math.pow(10 , 6) / (i * Math.pow(i + 1 , x));
		}
		ou.println((int)q);
		sc.close();
		ou.flush();
	}
}
0