結果
問題 | No.1273 はじめのζ関数 |
ユーザー | 遭難者 |
提出日時 | 2020-10-31 00:08:00 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 3,411 ms |
コンパイル使用メモリ | 72,124 KB |
実行使用メモリ | 58,404 KB |
最終ジャッジ日時 | 2023-09-29 09:15:07 |
合計ジャッジ時間 | 13,287 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 220 ms
55,456 KB |
testcase_03 | WA | - |
testcase_04 | AC | 212 ms
55,668 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 210 ms
55,384 KB |
testcase_08 | WA | - |
testcase_09 | AC | 221 ms
55,944 KB |
testcase_10 | WA | - |
testcase_11 | AC | 210 ms
55,744 KB |
testcase_12 | AC | 211 ms
55,624 KB |
testcase_13 | WA | - |
testcase_14 | AC | 210 ms
55,840 KB |
testcase_15 | AC | 219 ms
55,856 KB |
testcase_16 | AC | 219 ms
56,044 KB |
testcase_17 | AC | 209 ms
56,280 KB |
testcase_18 | AC | 217 ms
55,876 KB |
testcase_19 | AC | 221 ms
56,032 KB |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | AC | 175 ms
56,148 KB |
ソースコード
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; } if(q - (int)q > 0.95) q++; if(q - (int)q < 0.05) q--; ou.println((int)q); sc.close(); ou.flush(); } }