結果

問題 No.1273 はじめのζ関数
ユーザー 遭難者遭難者
提出日時 2020-10-30 22:43:37
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 433 bytes
コンパイル時間 3,072 ms
コンパイル使用メモリ 71,832 KB
実行使用メモリ 56,300 KB
最終ジャッジ日時 2023-09-29 07:42:32
合計ジャッジ時間 12,879 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 219 ms
56,056 KB
testcase_01 AC 220 ms
56,036 KB
testcase_02 AC 232 ms
55,536 KB
testcase_03 AC 217 ms
55,704 KB
testcase_04 AC 220 ms
55,688 KB
testcase_05 AC 219 ms
56,044 KB
testcase_06 AC 215 ms
55,560 KB
testcase_07 AC 218 ms
55,736 KB
testcase_08 AC 213 ms
55,388 KB
testcase_09 AC 227 ms
55,708 KB
testcase_10 AC 216 ms
56,020 KB
testcase_11 AC 219 ms
53,544 KB
testcase_12 AC 221 ms
55,936 KB
testcase_13 AC 215 ms
56,048 KB
testcase_14 AC 217 ms
55,596 KB
testcase_15 AC 226 ms
55,544 KB
testcase_16 AC 227 ms
56,012 KB
testcase_17 AC 217 ms
56,120 KB
testcase_18 AC 226 ms
55,612 KB
testcase_19 AC 228 ms
55,616 KB
testcase_20 WA -
testcase_21 AC 206 ms
56,268 KB
testcase_22 AC 216 ms
55,944 KB
testcase_23 AC 215 ms
56,044 KB
testcase_24 AC 215 ms
55,836 KB
testcase_25 AC 215 ms
55,760 KB
testcase_26 AC 206 ms
55,840 KB
testcase_27 AC 208 ms
56,032 KB
testcase_28 AC 207 ms
56,012 KB
testcase_29 AC 204 ms
56,300 KB
testcase_30 AC 204 ms
56,008 KB
testcase_31 AC 215 ms
55,952 KB
testcase_32 AC 205 ms
55,992 KB
testcase_33 AC 214 ms
55,764 KB
testcase_34 AC 206 ms
55,840 KB
testcase_35 AC 214 ms
55,668 KB
testcase_36 AC 209 ms
55,412 KB
testcase_37 AC 203 ms
56,276 KB
testcase_38 AC 204 ms
56,008 KB
testcase_39 AC 207 ms
55,396 KB
testcase_40 AC 185 ms
55,372 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++){
			double u = Math.pow(10 , 6) / (i * Math.pow(i + 1 , x));
			if(u > 0) q += u;
		}
		ou.println((int)q);
		sc.close();
		ou.flush();
	}
}
0